Image format conversions


I did not find any built in conversion function between grayscale and color images. It is of course not a big deal, I already wrote it for myself but it would be nice to have it in the juce toolkit.

Maybe it is not there because the documentation says SingleChannel is for alpha only images, but it is often necessary to work with grayscale images, like a depth buffer read from OpenGL. When you want to use/display it together with your other images you have to convert it to RGB.

Another potentially useful function in the toolkit, that I also had to write for myself, is the “add alpha channel to RGB”. Sometimes the alpha image comes in a separate file but you want to use a standard RGBA image for the further operations.