I am working on a project that I will transfer webcam images on the network , real time. But Iplimage has a big size so it does not fit in a udp packet. I have to compress it to jpeg format. I made some research many examples do save the picture on disk then read to the memory. But I want do it on memory. I am using Qt on my project.
Is there any solution for compressing Iplimage on memory ?
May be Qt has a solution for that ?
Qt has QImageWriter class which supports JPEG format and allows specifying compression level. You can use it to save QImage data to QByteArray. Below is an example:
or you can use QPixmap save method; it also allows specifying memory buffer as output device:
hope this helps, regards