I am using FreeImagePlus/FreeImage. I want to compress the bitmaps without saving them to HDD (files) using FreeImagePlus/FreeImage.
The given function FreeImage_save
does compress but its main aim is to save that image into a file in hard drive.
I am interested in compression only. How can I do this?
The
saveToMemory
function does the job. Compress only can be implemented by using compress and save to memory, as following:Now
memIO
contains the saved image in the given compression format.In other words, raw image from memory is compressed and the output (compressed image) is put back to memory.