Convcert sRGB to CMYK

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?".
Post Reply
manu_l
Posts: 5
Joined: 2014-10-06T23:50:37-07:00
Authentication code: 6789

Convcert sRGB to CMYK

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

Re: Convcert sRGB to CMYK

Post 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.
snibgo's IM pages: im.snibgo.com
manu_l
Posts: 5
Joined: 2014-10-06T23:50:37-07:00
Authentication code: 6789

Re: Convcert sRGB to CMYK

Post by manu_l »

Hi Snibgo,
I use PS (Version 13) to show the result:

Input:
Image

Output:
Image
Last edited by manu_l on 2015-03-04T23:44:36-07:00, edited 1 time in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convcert sRGB to CMYK

Post 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.
snibgo's IM pages: im.snibgo.com
zaratol
Posts: 43
Joined: 2010-04-21T08:30:43-07:00
Authentication code: 8675308

Re: Convcert sRGB to CMYK

Post 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
afre
Posts: 57
Joined: 2014-01-22T15:02:53-07:00
Authentication code: 6789

Re: Convcert sRGB to CMYK

Post 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?
ImageMagick 7.0.7-25 Q16 x64 2018-03-04 · Cipher DPC HDRI Modules OpenMP · Windows 7
afre
Posts: 57
Joined: 2014-01-22T15:02:53-07:00
Authentication code: 6789

Re: Convcert sRGB to CMYK

Post 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.
ImageMagick 7.0.7-25 Q16 x64 2018-03-04 · Cipher DPC HDRI Modules OpenMP · Windows 7
zaratol
Posts: 43
Joined: 2010-04-21T08:30:43-07:00
Authentication code: 8675308

Re: Convcert sRGB to CMYK

Post 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
zaratol
Posts: 43
Joined: 2010-04-21T08:30:43-07:00
Authentication code: 8675308

Re: Convcert sRGB to CMYK

Post by zaratol »

so it comes down to this question: how to delete specific tag with id from tiff with imageMagick
afre
Posts: 57
Joined: 2014-01-22T15:02:53-07:00
Authentication code: 6789

Re: Convcert sRGB to CMYK

Post by afre »

As the saying goes, it's about using the right tool for the job. I use ExifTool regularly with IM and PS.
ImageMagick 7.0.7-25 Q16 x64 2018-03-04 · Cipher DPC HDRI Modules OpenMP · Windows 7
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convcert sRGB to CMYK

Post by snibgo »

tiff:ignore-tags is fairly new. If it doesn't work, try an IM upgrade.
snibgo's IM pages: im.snibgo.com
zaratol
Posts: 43
Joined: 2010-04-21T08:30:43-07:00
Authentication code: 8675308

Re: Convcert sRGB to CMYK

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