Hello,

Is there a convenient way to save photographic images, using JPEG compression, into a QDataStream?

According to the Qt documentation, the QImage and QPixmap << operators save the image data in PNG format, but this is not very efficient (from the compression point of view) when the images are colour photographs rather than line graphics.

In my application, I have objects that contain multiple photographic images, alongside a bunch of other metadata (including other images which are best saved in PNG format). I'd like to be able to serialize the whole contents of the object into a single binary file, but with JPEG compression for the photographic images - I don't want to have to save a bunch of .jpg files with a separate binary file for everything else.

Can this be done?

Thanks,
Stephen.