Even though i set Opaque as TRUE, Juce Creates an ARGB image under a FLAG USE_COREGRAPHICS_RENDERING …
As jpeg doesnt have Transperancy, its not able to Encode the raw buffer as JPG …
If i set USE_COREGRAPHICS_RENDERING as 0 in Juce_mac_NativeIncludes.h, Everything works … I am able to save the image in .JPG format …
Can u help me understand why USE_COREGRAPHICS_RENDERING is enabled by default in MAC if there are issues with saving as .JPG format .
Sorry, I didn’t realise there was a problem with that!
The reason is that to use CoreGraphics, all Images have to use an alpha channel internally. I should have added a workaround for this anyway, which just requires a simple tweak, in juce_JPEGLoader.cpp:
[code]bool JPEGImageFormat::writeImageToStream (const Image& image, OutputStream& out)
{
using namespace jpeglibNamespace;
using namespace JPEGHelpers;