I am trying to send Iplimage to another program as a array of bytes in c++/cli. The program needs to save the Iplimage as jpeg image. Let’s say the Iplimage is img which I am obtaing by cvQyeryFrame from an avi video file, I am returning img->imagedata to the other program. Does img->imagedata contain the header for the jpeg image to be saved or does it only contain the data. If it only contains the data, how can I include the header? I can save the image using cvSaveImage and then read it but there should be a more direct way (maybe cvEncodeImage? )
thanks.
The data in the Iplimage is already decoded into own format of openCV (typically 8bit B,G,R) once it has been read from disk.
The newer versions of opencv can encode/decode an image in memory, see imencode.