Colours in iOS JUCE Ver.: 8.0.4

JUCE Ver.: 8.0.4
iPadOS Ver.: 16.7.7
iPad: Model number: ML2M2KN/A A1652

Changed from JUCE Ver.: 7.0.12 to JUCE Ver.: 8.0.4.

Now suddenly the Red and Blue are changed when calling juce::Colour ? E.g

                spectrImGraphcs.setColour
                (
                    Colour((uint8)0
                        , (uint8)0
                        , (uint8)0xff)
                );

gives the Colour Red when drawing arrows in spectrImGraphcs

and

                spectrImGraphcs.setColour
                (
                    Colour((uint8)0xff
                        , (uint8)0
                        , (uint8)0)
                );

gives the Colour Blue when drawing arrows in spectrImGraphcs

and

                spectrImGraphcs.setColour
                (
                    Colour((uint8)0
                        , (uint8)0xff
                        , (uint8)0)
                );

gives the Colour Green when drawing arrows in spectrImGraphcs

spectrImGraphcs is defined like this:


Image spectrogramImage{ Image::RGB, widthOfTuneWindow, hightOfTuneWindow, true, juce::SoftwareImageType{} };
juce::Graphics spectrImGraphcs{ spectrogramImage };

?

Thanks for reporting this issue.

I’m able to observe similar unexpected behaviour when creating a solid colour SoftwareImageType image, and then drawing that image in the CoreGraphics renderer. However, I see the same behaviour in JUCE 7 and even JUCE 6, too. Therefore, I’m concerned that I may be seeing a different failure to the one that you reported.

Is it possible that anything else changed when you updated your version of JUCE? Had you previously built your project for iOS?

It turns out that changing

Image spectrogramImage{ Image::RGB, widthOfTuneWindow, hightOfTuneWindow, true };

to

Image spectrogramImage{ Image::RGB, widthOfTuneWindow, hightOfTuneWindow, true, juce::SoftwareImageType{} };

interchanges the Red and Blue in iPadOS !

?

That’s consisent with what I’m seeing. Did you add SoftwareImageType{} when updating?

Yes I did.

Thanks for reporting. That bug is fixed here: