Page 1 of 1

colorspace change causes heavy pixelation

Posted: 2007-03-22T17:51:08-07:00
by blahor
hi everyone!

i'm in the need of an automated colorspace conversion for jpeg images (from rgb to cmyk) and tried to do it with:

Code: Select all

convert foo.jpg -colorspace cmyk -quality 100 bar.jpg
unfortunately the resulting bar.jpg is awfully pixelated. if i don't change the colorspace the image degredation isn't noticeable at all so i guess it has something to do with the colorspace change. photoshop can do it fine so IM has to be able to do it either.

what can i do avoid the pixelation or am i doing something wrong?

Re: colorspace change causes heavy pixelation

Posted: 2007-03-22T18:30:06-07:00
by anthony
See profile and changing colorspace, in IM examples
http://www.imagemagick.org/Usage/formats/#colorspace

Re: colorspace change causes heavy pixelation

Posted: 2007-03-22T19:16:42-07:00
by blahor
thx for pointing me in the right direction, unfortunately i still can't get it working.

i've downloaded adobe's free icc profiles and tried to convert to cmyk with:

Code: Select all

convert foo.jpg +profile icm -profile EuroscaleUncoated.icc bar.jpg
and

Code: Select all

convert foo.jpg -profile EuroscaleUncoated.icc bar.jpg
both resulting in an image with invalid icc profile and still rgb. help appreciated...

Re: colorspace change causes heavy pixelation

Posted: 2007-03-22T19:47:29-07:00
by anthony
your need three profile options! remove, input and output!

Re: colorspace change causes heavy pixelation

Posted: 2007-03-22T20:19:26-07:00
by blahor
alright, got it finally working with the -profile option:

Code: Select all

convert foo.jpg +profile icm -profile AdobeRGB1998.icc -profile USWebCoatedSWOP.icc -quality 100 bar.jpg
thx. unfortunately the resulting image quality is still pretty bad. the colors are better but it's still pixelated.

here's an example of the results:

original rgb: http://fraglab.at/tmp/big_0.jpg

photoshop: http://fraglab.at/tmp/big_0_ps.jpg

IM with above command: http://fraglab.at/tmp/big_0_im.jpg


there's got to be a better way...

Re: colorspace change causes heavy pixelation

Posted: 2007-03-23T10:06:14-07:00
by blahor
seems like i've taken exactly the 'right' picture for the test. works much better with other pictures. no noticeable loss of quality at all.

what's the reason for the different results? profile of the src image?

Re: colorspace change causes heavy pixelation

Posted: 2007-03-23T19:16:51-07:00
by anthony
Or just a bad picture. Prehaps a posting of the image so we can see the pixeliation.
I don't think I can do anything about it, but others may be able to. Prehaps in a new subject
"what is wrong with this CYMK picture?"