Converting OpenCV Mat to Juce::Image


Hello folks. I am new to Juce. I would like to make a photoshop like application that has minimal features for game development. I liked the Juce’s GUI programming tools, they handle such low level graphics really easily and super easy to customise as far as I see.

I would like to use OpenCV as the image processing library. However I have one question. My question is in the title.

I don’t know if Juce accepts image construction from its data. Also, I have doubts on incompatibilities of two data type (opencv Mat and Juce::Image)

If someone who has experience on both framework could shed light on my problem or suggest some suggestions, I will be really appreciated.


Hi borasermiz,
that is possible. The JUCE Image class is indeed very easy to use for displaying and manipulating. You can access the underlying data using the Image::BitmapData class for reading and for writing. I did recently the same for integrating ffmpeg here.

You have two formats, either RGB0 or ARGB, which you should be able to map to an OpenCV format as well.

Good luck for your project.


Thank you very much.