I need to stream Images over network. It’s a stream of Images sent with constant rate (imagine you want to grab/capture image data from some video device like a webcam and send it over network to a client app). I have noticed the Image::writeImageToStream is very slow. By “very slow” I mean I cannot get any better than ca. 5 fps (my images are like 400x400). I have already limited that issue to the Image::writeImageToStream as if I get rid of if (and will be sending some constant block of memory every time, although I left generating/capturing images untouched so that I know it’s not the capturing part consuming my CPU), then 25fps and higher is not a problem.
I have tried both PNGImageFormat and JPEGImageFormat. My PC is Win10 with some 4x2.8Ghz Intel i7 not doing any other CPU consuming tasks when testing this. I’ve also tried replacing libpng with latest v1.6.37 from http://www.libpng.org/pub/png/libpng.html. The above ca. 5 fps was when in Debug mode. In Release (where some code optimizations occur etc.) I got slightly better results and can get ca. 10 fps, but it’s still far beyond what I would expect:) Especially that I’m talking about some relatively small images 400x400 (RGB) without any frame processing.
Any recommendations on how/if I could get higher fps? I’m happy to use different methods if you know any.