Load image CMYK


#1

Hello,

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

C.


#2

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.


#3

Perhaps you can use this algorithm, instead of ImageMagick.


#4

Hello,
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 !