c++ - juce::Image::RGB seems to produce 4 channel image - Stack Overflow

时间: 2025-01-06 admin 业界

I am using JUCE to display openCV images. At render time I memcopy the buffer from the Mat to the juce Image. However, I'm now interested in doing this without the alpha channel. I altered my code, but this assert is failing:

        juce::Image im = juce::Image(juce::Image::RGB, tile.cols, tile.rows, true);
        assert(im.isRGB());

It seems like regardless of the format the image is created as an ARGB. Does any one know what's going on?