Page 1 of 1

Convcert sRGB to CMYK

Posted: 2014-12-11T01:27:46-07:00
by manu_l
Hello,
I try to convert tiff-files with sRGB profile to CMYK profile. The colors look difference after converting:

Code: Select all

convert input.tif  -profile /tmp/profiles/CoatedFOGRA39.icc output.tif
I also try this with

Code: Select all

-strip
or

Code: Select all

 +profile sRGB
to remove the profile of the "input.tif"

Does anyone know how to convert this files?



Version: ImageMagick 6.8.5-8
OS: Red Hat Enterprise Linux Client release 5.11

Re: Convcert sRGB to CMYK

Posted: 2014-12-11T01:43:39-07:00
by snibgo
manu_l wrote:The colors look difference after converting:
What output device did you use for the comparison? You have converted a file for a CMYK printer using coated paper. Is that what you used for the comparison?

Or perhaps you displayed the output on a screen, which is an sRGB device. If so, then some software will have converted the result back from CMYK to sRGB. What software did you use? Some software ignores embedded profiles.

Re: Convcert sRGB to CMYK

Posted: 2014-12-11T01:56:25-07:00
by manu_l
Hi Snibgo,
I use PS (Version 13) to show the result:

Input:
Image

Output:
Image

Re: Convcert sRGB to CMYK

Posted: 2014-12-11T02:08:55-07:00
by snibgo
Photoshop has loads of settings on converting between colorspaces, and how to deal with out-of-gamut colors, and dot gain, and black point, and so on. I don't know enough to advise. Sorry.

Re: Convcert sRGB to CMYK

Posted: 2015-03-04T10:40:49-07:00
by zaratol
Reason is Photoshop tag 37724, Photoshop saves Image in this block, but ImageMagick color Conversion only touches Real image.

i think somehow Photoshop first loads image from this block, so profile Information and Image Data mismatch.
Older versions of ImageMagick would just ignore the block and throw it away, so resulting Image would always looks fine. Current ImageMagick should have option to ignore tag:
http://www.imagemagick.org/script/comma ... php#define

tiff:ignore-tags=comma-separate-list-of-tag-IDs
Allows one or more tag ID values to be ignored.

But for me -define tiff:ignore-tags=37724 does nothing.

Current solution for me:
exiftool -overwrite_original -imageSourceData= output.tif

maybe somoene can help how to properly use ignore-tags

Re: Convcert sRGB to CMYK

Posted: 2015-03-04T11:16:45-07:00
by afre
Sorry for my ignorance—just entering the discussion, I am having trouble understanding the problem. Do the TIF files originate from PS, IM or unknown? Are we trying to assign a profile but it is failing? Or are we converting from one colorspace to another? Or something else?

Re: Convcert sRGB to CMYK

Posted: 2015-03-04T11:34:50-07:00
by afre
Did a quick search:
ExifTool considers the "ImageSourceData" tag unsafe. Not much is understood. PS does a lot of things that are incompatible with the rest of the software world so I am not surprised.

Re: Convcert sRGB to CMYK

Posted: 2015-03-04T11:41:27-07:00
by zaratol
the original file is created with photoshop.
We try converting from rgb tif (profile embeded) to cmyk via icc profile Conversion.
Problem Photoshop will always save the image date as preview in tag 37724, and (ASSUMPTION) will load preview from that tag.

If you do colour conversion with image magick and load converted image with photoshop again the colours apear "tainted". From my understanding, photoshop will load preview from tag 37724 if present but will display it with new Profile Information
But if you delete tag 37724 with some external tool everthing is ok. So it is really a photoshop sepecifc problem.

But what i like to see is a full command line for rgb to cmyk conversion while deleting tag 37724.
i tried
convert -define tiff:ignore-tags=37724 source.tif -profile "cmykProfile.icc" output.tif
convert source.tif -define tiff:ignore-tags=37724 -profile "cmykProfile.icc" output.tif

but no matter what i do in output.tif the tag 37724 is still present

Re: Convcert sRGB to CMYK

Posted: 2015-03-04T11:42:30-07:00
by zaratol
so it comes down to this question: how to delete specific tag with id from tiff with imageMagick

Re: Convcert sRGB to CMYK

Posted: 2015-03-04T12:01:21-07:00
by afre
As the saying goes, it's about using the right tool for the job. I use ExifTool regularly with IM and PS.

Re: Convcert sRGB to CMYK

Posted: 2015-03-04T12:10:50-07:00
by snibgo
tiff:ignore-tags is fairly new. If it doesn't work, try an IM upgrade.

Re: Convcert sRGB to CMYK

Posted: 2015-03-04T12:15:17-07:00
by zaratol
convert.exe -version
Version: ImageMagick 6.9.0-9 Q16 x64 2015-02-28 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC Modules OpenMP
Delegates (built-in): bzlib cairo freetype jbig jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib

latest windows version. i tried bot static and dynamic binaries