Load image CMYK



I have problem to load image CMYK with gl::Texture::create(loadImage(loadAsset(fileName)));

Do you know solution to detect CMYK and convert to RGB or load image directly in CMYK ?

Thanks a lot



You can check for the ImageIoExceptionIllegalColorModel exception during load. I would call a command line application like ImageMagick to convert the image to rgb as a simple workaround.


Perhaps you can use this algorithm, instead of ImageMagick.


With imageMagick I used this command :

 magick mogrify -colorspace RGB test.jpg

It works very well !

With backoffice to manage data, sometimes someone use CMYN format !