Hi Olivier,
The code works. However, the output image is not compressed. It has the same size (in octets) as theĀ one which uses the default jpeg_tag.
On my system the jpeg with quality set to 100% is 20KB, whereas the one with 30% for quality is only 4KB. Could you set a breakpoint in boost\gil\extension\io_new\formats\jpeg\write.hpp[119]? That's where the quality is set.
BTW, you can pass strings into the io_new interface. No need for c_str(). Also the jpeg_dct_method::fastest parameter works just fine.
Could yo please also tell me more about this parameter?
The dct parameter stands for discrete cosine transformation and it's for selecting the appropriate method to do that transformation. In some cases those calculation can be quite expensive. Regards, Christian