problem with conversion from CMYK to sRGB

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
t.hund
Posts: 7
Joined: 2016-01-12T00:33:03-07:00
Authentication code: 1151
Contact:

problem with conversion from CMYK to sRGB

Post 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
Last edited by t.hund on 2016-01-12T07:57:49-07:00, edited 1 time in total.
Problemes d'erection viagrasansordonnancefr.com les essais cliniques
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: problem with conversion from CMYK to sRGB

Post 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?
t.hund
Posts: 7
Joined: 2016-01-12T00:33:03-07:00
Authentication code: 1151
Contact:

Re: problem with conversion from CMYK to sRGB

Post by t.hund »

yes i have llcms2

LIBS -lMagickCore -llcms2 -lfreetype -lbz2 -lz -lltdl -lm -lgomp
Problemes d'erection viagrasansordonnancefr.com les essais cliniques
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: problem with conversion from CMYK to sRGB

Post 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.
t.hund
Posts: 7
Joined: 2016-01-12T00:33:03-07:00
Authentication code: 1151
Contact:

Re: problem with conversion from CMYK to sRGB

Post 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?
Problemes d'erection viagrasansordonnancefr.com les essais cliniques
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: problem with conversion from CMYK to sRGB

Post 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.
t.hund
Posts: 7
Joined: 2016-01-12T00:33:03-07:00
Authentication code: 1151
Contact:

Re: problem with conversion from CMYK to sRGB

Post by t.hund »

Thanks, i'll search and try a new sRGB profile and get back to you.
Problemes d'erection viagrasansordonnancefr.com les essais cliniques
t.hund
Posts: 7
Joined: 2016-01-12T00:33:03-07:00
Authentication code: 1151
Contact:

Re: problem with conversion from CMYK to sRGB

Post 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.
Problemes d'erection viagrasansordonnancefr.com les essais cliniques
t.hund
Posts: 7
Joined: 2016-01-12T00:33:03-07:00
Authentication code: 1151
Contact:

Re: problem with conversion from CMYK to sRGB

Post 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.
Problemes d'erection viagrasansordonnancefr.com les essais cliniques
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: problem with conversion from CMYK to sRGB

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: problem with conversion from CMYK to sRGB

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: problem with conversion from CMYK to sRGB

Post by fmw42 »

Dot Gain, for example, is in the Color Settings Window
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: problem with conversion from CMYK to sRGB

Post by magick »

The washed out appearance could be from sRGB. After you convert to sRGB, try linear RGB with the -colorspace RGB option.
t.hund
Posts: 7
Joined: 2016-01-12T00:33:03-07:00
Authentication code: 1151
Contact:

Re: problem with conversion from CMYK to sRGB

Post by t.hund »

Thanks !

I'll try and get back !
Problemes d'erection viagrasansordonnancefr.com les essais cliniques
broberts
Posts: 12
Joined: 2016-04-21T06:52:09-07:00
Authentication code: 1151

Re: problem with conversion from CMYK to sRGB

Post 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.
Post Reply