TIFF Compression JPG with 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?".
Heiler81
Posts: 63
Joined: 2009-03-12T01:52:24-07:00
Authentication code: 8675309
Location: Germany, Stuttgart

TIFF Compression JPG with CMYK

Post by Heiler81 »

Hi guys,

i got the problem that i didn´t get a good jpg out af a tiff JPG compression and CMYK. The Colorspace looks wrong!

convert image -colorspace "RGB" -depth "8" -flatten image.jpg

IM 6.6.5-0 Solaris 10 X86

Sample Image

ftp://217.111.65.115 imagemagick/imagemagick (acoount will be locked after 02.11.2011)
Heiler81
Posts: 63
Joined: 2009-03-12T01:52:24-07:00
Authentication code: 8675309
Location: Germany, Stuttgart

Re: TIFF Compression JPG with CMYK

Post by Heiler81 »

Any news here?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: TIFF Compression JPG with CMYK

Post by magick »

For proper CMYK to RGB (or visa versa) color conversion, you need to use color profiles (see -profile option).
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: TIFF Compression JPG with CMYK

Post by anthony »

better still convert to a sRGB profile!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Heiler81
Posts: 63
Joined: 2009-03-12T01:52:24-07:00
Authentication code: 8675309
Location: Germany, Stuttgart

Re: TIFF Compression JPG with CMYK

Post by Heiler81 »

I tried the options

-profile "C:\ICC\AdobeRGB1998.icc"
-profile "C:\ICC\sRGB Color Space Profile.icm"

but the result it still wrong but with sRGB it look different
Heiler81
Posts: 63
Joined: 2009-03-12T01:52:24-07:00
Authentication code: 8675309
Location: Germany, Stuttgart

Re: TIFF Compression JPG with CMYK

Post by Heiler81 »

I think i got it, it looks like a Photoshop CS3 problem. I saved it new in CS4 and it works.
Heiler81
Posts: 63
Joined: 2009-03-12T01:52:24-07:00
Authentication code: 8675309
Location: Germany, Stuttgart

Re: TIFF Compression JPG with CMYK

Post by Heiler81 »

Ok I was wrong, only the Windows 7 preview was shown ok than. After touching with IM the JPG is damaged.

I know used the newest IM Version in Windows, I can also attach the originla image.

C:\Program Files\ImageMagick-6.7.3-Q16>convert -profile "C:\Temp\test\CoatedFOGR
A27.icc" -profile "c:\Temp\test\sRGB Color Space Profile.icm" "c:\Temp\test\1040
23_121_05_CS4.tif" c:\Temp\test\test.jpg
convert: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag'
@ warning/tiff.c/TIFFWarnings/761.
convert: Incompatible type for "FileSource"; tag ignored. `TIFFFetchNormalTag' @
warning/tiff.c/TIFFWarnings/761.
convert: Incompatible type for "SceneType"; tag ignored. `TIFFFetchNormalTag' @
warning/tiff.c/TIFFWarnings/761.
convert: Wrong data type 3 for "GainControl"; tag ignored. `TIFFReadCustomDirect
ory' @ warning/tiff.c/TIFFWarnings/761.
convert: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag'
@ warning/tiff.c/TIFFWarnings/761.
Heiler81
Posts: 63
Joined: 2009-03-12T01:52:24-07:00
Authentication code: 8675309
Location: Germany, Stuttgart

Re: TIFF Compression JPG with CMYK

Post by Heiler81 »

Any reason for that? Should i attach the File to the ftp?
Heiler81
Posts: 63
Joined: 2009-03-12T01:52:24-07:00
Authentication code: 8675309
Location: Germany, Stuttgart

Re: TIFF Compression JPG with CMYK

Post by Heiler81 »

So its very easy to show up the problem. Creat a TIF in CMYK with JPG Compression und use the parameters above. The JPG result looks inverted! Any idea to handel this?
Heiler81
Posts: 63
Joined: 2009-03-12T01:52:24-07:00
Authentication code: 8675309
Location: Germany, Stuttgart

Re: TIFF Compression JPG with CMYK

Post by Heiler81 »

Same FTP Account image name is 104023_121_05.tif
Heiler81
Posts: 63
Joined: 2009-03-12T01:52:24-07:00
Authentication code: 8675309
Location: Germany, Stuttgart

Re: TIFF Compression JPG with CMYK

Post by Heiler81 »

Anybody can help?
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: TIFF Compression JPG with CMYK

Post by NicolasRobidoux »

I tried to download your image but your ftp site was locked.

------

If I may venture a guess:

Adobe CMYK is generally different from other CMYK in that they express values as ink density instead of lightness (or the other way around). So, if there are traces that this is an Adobe CMYK in the header, the values should be inverted.

Non ImageMagick possible solutions (I'm not saying IM can't deal, I'm just proposing what I know best):

Option 1) Open the image in nip2. Then, single click on the bar on the left of the image thumnail, and go to Toolkits -> Colour -> ICC -> Import. Double click on the new thumbnail to view it full size. The tool has options. Play with them.

Option 2) Check out http://libvips.blogspot.com/2011/12/tas ... nvert.html. This produces sRGB JPEGs, but it's easy to modify to get something else. The program could be replaced by VIPS command line operations. (VIPS and NIP2 are "competitors" of ImageMagick. Like IM, it runs on most everything.)
Heiler81
Posts: 63
Joined: 2009-03-12T01:52:24-07:00
Authentication code: 8675309
Location: Germany, Stuttgart

Re: TIFF Compression JPG with CMYK

Post by Heiler81 »

User imagemagick
PW imagemagick

should work
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: TIFF Compression JPG with CMYK

Post by NicolasRobidoux »

Heiler81: You'd rather have something batch or something through a GUI?
vvaz
Posts: 4
Joined: 2011-12-21T05:17:14-07:00
Authentication code: 8675308

Re: TIFF Compression JPG with CMYK

Post by vvaz »

Don't know which party is guilty but sometimes colorspace conversion with IM doesn't properly kick in. When doing conversion only with -colorspace IM only changes declaration of colorspace in file but doesn't exchange 'real' ICC info (for example ICC CMYK profile can be still attached). Some programs read only metadata and render files according to it, some dig deeper and render it as CMYK. You have to get rid of info about profile (-strip should be enough, if you want to be more precise exiftool may be a better choice) and set colorspace declaration. You can kiss goodbye faithful conversion but colors should look right at least.

Beware: order of steps is important but I don't remember exactly - it was always try'n'error for me...
Post Reply