Page 1 of 2

problem with conversion from CMYK to sRGB

Posted: 2016-01-12T03:27:37-07:00
by t.hund
Hi

We use image magick by command line in order to convert image to different color space.

One of the command we used : (for CMYK to RGB)
  • convert -quiet -respect-parenthesis -units PixelsPerInch -density 300 'in/CMYK-ISOcoated V2/CMYK-ISOcoated V2_2.tif[0]' +repage \( -clone 0 -auto-orient -profile /var/www/media/icc/sRGB_IEC61966-2-1_black_scaled.icc -colorspace 'sRGB' -background 'white' -format 'TIFF' -compress 'LZW' -interlace 'line' -type optimize -quality '75' -define tiff:alpha=associated -define tiff:rows-per-strip=11 -write 'TIFF':'out/CMYK-ISOcoated V2/RGB/CMYK-ISOcoated V2_2.tif' +delete \) null:
The resulting image look like the original in gimp or indesign, but when opened with photoshop there're big colors différences .

We use ImageMagick 6.8.6-8

I can't share the 2 images publicly but i can send them by dm

Re: problem with conversion from CMYK to sRGB

Posted: 2016-01-12T05:46:35-07:00
by magick
Is the LCMS delegate library supported in your release of ImageMagick? Its required for proper colorspace conversion. Type
  • convert -list configure
Does the LIBS tag include -llcms or -llcms2?

Re: problem with conversion from CMYK to sRGB

Posted: 2016-01-12T06:46:22-07:00
by t.hund
yes i have llcms2

LIBS -lMagickCore -llcms2 -lfreetype -lbz2 -lz -lltdl -lm -lgomp

Re: problem with conversion from CMYK to sRGB

Posted: 2016-01-12T07:21:01-07:00
by magick
It looks like you have a sRGB color profile. Does your TIFF image include a CMYK profile? Two profiles are required for a proper color conversion. If none is included, use the -profile option and point it to a CMYK color profile. Remove the -colorspace SRGB option since the two profiles will properly return a sRGB image.

Re: problem with conversion from CMYK to sRGB

Posted: 2016-01-12T08:23:00-07:00
by t.hund
When I open the image with Photoshop, it shows an ISO Coated V2 incorporated profile.
I'm not at ease with color profiles, so I'm not sure if it's a CMYK or something else. That would be nice if you could give me some more informations about it :)

To recap, what I've got to do is to:
- Remove the -colorspace sRGB option
- Use the -profile option and point it to a CMYK profile and use a second profile option which points to a sRGB profile? How to accomplish this?

Re: problem with conversion from CMYK to sRGB

Posted: 2016-01-12T08:33:03-07:00
by magick
We're good. The CMYK profile is embedded in the source image. Now let's consider your sRGB profile? The combo of the two profiles is what determines how each pixel is transformed. If you are not getting the expected results, you may need a different sRGB color profile.

Re: problem with conversion from CMYK to sRGB

Posted: 2016-01-13T00:43:58-07:00
by t.hund
Thanks, i'll search and try a new sRGB profile and get back to you.

Re: problem with conversion from CMYK to sRGB

Posted: 2016-01-13T03:08:34-07:00
by t.hund
Hi, i'm back !

I've removed the -colorspace sRGB option, and i've try differents icc file (find here http://www.color.org/srgbprofiles.xalter)

sRGB_ICC_v4_appearance_beta_displayclass.icc
sRGB_IEC61966-2-1_black_scaled.icc
sRGB_v4_ICC_preference.icc
sRGB_v4_ICC_preference_displayclass.icc

here's my command line :

LC_ALL=C convert -quiet -respect-parenthesis -units PixelsPerInch -density 300 'in/CMYK-ISOcoated V2/CMYK-ISOcoated V2_2.tif[0]' +repage \( -clone 0 -auto-orient -profile /srv/www/vhosts/test_imageMagik/sRGB_IEC61966-2-1_black_scaled.icc -background 'white' -format 'TIFF' -compress 'LZW' -interlace 'line' -type optimize -quality '75' -define tiff:alpha=associated -define tiff:rows-per-strip=11 -write 'TIFF':'out_test/CMYK-ISOcoated V2_2_sRGB_IEC61966-2-1_black_scaled_icc.tif' +delete \) null:

But i've got the same result (color problem just with photoshop).

If you've a mail, i can send you the original file.

Re: problem with conversion from CMYK to sRGB

Posted: 2016-01-14T05:54:24-07:00
by t.hund
I also try with this profils :

AdobeRGB1998.icc
AppleRGB.icc
ColorMatchRGB.icc

But always the same result ,the image seems washed out with photoshop.

Re: problem with conversion from CMYK to sRGB

Posted: 2016-01-14T06:52:10-07:00
by magick
You could try -gamma 0.8, for example to reduce the washed out appearance. Otherwise, you would need to identify exactly what sort of transform Photoshop is performing on the image. Once you know that, we should be able to get ImageMagick to reproduce it. Since Photoshop is proprietary, we don't know exactly how the image is transformed. In many cases, Photoshop demands a non-standard JPEG or TIFF since it typically treats CMYK as inverted. They may also have a non-linear algorithm for converting CMYK to sRGB.

Re: problem with conversion from CMYK to sRGB

Posted: 2016-01-14T07:16:14-07:00
by snibgo
Photoshop also tries to make a CMYK image look as it would when printed. To do this it need to convert to RGB for the screen, of course. But it also accounts for the CMYK and RGB gamuts being different, and the dots made by printers not being perfect little circles.

To make Photoshop display a CMYK image as other simpler programs do, you need to turn these features off. I don't use Photoshop, so don't know how.

Re: problem with conversion from CMYK to sRGB

Posted: 2016-01-14T10:22:15-07:00
by fmw42
Dot Gain, for example, is in the Color Settings Window

Re: problem with conversion from CMYK to sRGB

Posted: 2016-01-14T10:36:29-07:00
by magick
The washed out appearance could be from sRGB. After you convert to sRGB, try linear RGB with the -colorspace RGB option.

Re: problem with conversion from CMYK to sRGB

Posted: 2016-01-14T11:00:02-07:00
by t.hund
Thanks !

I'll try and get back !

Re: problem with conversion from CMYK to sRGB

Posted: 2016-04-26T08:56:55-07:00
by broberts
I'm trying to do some CMYK to RGB conversions for thumbnails and having all sorts of trouble with colors casting neon. I've tried using profiles and modulate but having no success. We're currently running IM 6.9.3Q8 with lcms. Any ideas? Here's what I tried last...just went back to a profile...

D:\>ImageMagick_693_Q8\convert -density 300 Diet7up.eps -profile D:\ImageMagick_693_Q8\USWebCoatedSWOP.icc -colorspace rg
b -flatten -alpha flatten -alpha remove -resize 128x128 -quality 95 -profile D:\ImageMagick_693_Q8\AdobeRGB1998.icc test.jpg

https://dl.dropboxusercontent.com/u/250 ... UPcmyk.eps

Any assistance would be greatly appreciated.