Little more help with writing a o buffer with libjpeg
- by Richard Knop
So I have managed to find another question discussing how to use the libjpeg to compress an image to jpeg. I have found this code which is supposed to work:
Compressing IplImage to JPEG using libjpeg in OpenCV
Here's the code (it compiles ok):
/*
This a custom destination manager for jpeglib that
enables the use of memory to memory compression.
…