Conversion of JPEG files with icc profiles has quality loss

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
K2Ronald
Posts: 1
Joined: 2011-01-25T05:47:55-07:00
Authentication code: 8675308

Conversion of JPEG files with icc profiles has quality loss

Post by K2Ronald »

Hello everyone,

I'm having trouble getting a good jpeg quality after i converted it with an icc profile from RGB to CMYK. Does anyone know the right command to get a lossless quality jpeg when converting from rgb to cmyk?

I used this command on Imagemagick version 6.5.0.0 Q16:
convert -profile ./icc/AdobeRGB1998.icc -profile ./icc/ISOcoated_v2_300_eci.icc testb.jpg test2.jpg

Also tried this command with and without (-density 300 -quality 100) added to it:
convert -verbose -compress None -black-point-compensation -intent Relative -profile ./icc/AdobeRGB1998.icc -profile ./icc/ISOcoated_v2_300_eci.icc testb.jpg test2.jpg

Original picture:
Image
Output picture (if you can't see the picture below use a browser that supports cmyk like firefox):
Image
indiego
Posts: 75
Joined: 2010-10-16T06:35:10-07:00
Authentication code: 8675308

Re: Conversion of JPEG files with icc profiles has quality l

Post by indiego »

Hello K2Ronald,

I haven't tried this with IM so I can't help you with this. Anyhow some notes from me.

- You convert a picture from a larger color space (RGB) to a smaller color space (CMYK). So a loss of color information is natural. There are also several methods to handle colors that are not part of the destination color space: absolute colorimetric, relative colorimetric, perceptual and saturation. Donno which method IM uses as default. Anyhow, the used method has a large effect on the final colors.

[ignore this, if your graphics are no screenshots...]
- the default color space of all windows variants is sRGB and not AdobeRGB; you use JPG as output format and this is definitely the wrong format for screenshots (use PNG and only PNG; optipng for a better compression). JPG itself is lossy and changes colors to gain better compression levels.


indiego
indiego
Posts: 75
Joined: 2010-10-16T06:35:10-07:00
Authentication code: 8675308

Re: Conversion of JPEG files with icc profiles has quality l

Post by indiego »

I just made a short test.

convert testb.jpg -profile ISOcoated_v2_300_eci.icc test2.jpg

gives much better results. The first transformation to AdobeRGB (sRGB) should be left out. But for a complete color management you should embed sRGB.icc in the source graphic and try again. Without a well defined source color space your color management is broken. It works only if IM uses sRGB as standard RGB profile for conversions.

And please save your screenshots as PNG. I get eye cancer from the JPG compression artefacts ;-)

indiego
Post Reply