Converting from PNG to CMYK JPG in steps give blocky image

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
casperno

Converting from PNG to CMYK JPG in steps give blocky image

Post by casperno »

Hi,

Found a strange bug. We produce print material and convert RGB images to CMYK with ICC profiles.

When we do resize, flatten and convert to CMYK in two steps, the resulting JPG becomes blocky. The resolution in pixels is correct, but it looks like it's been upscaled from about half it's final size.

org.png -resize 257 -background white -flatten orgRes.jpg
convert orgRes.jpg -profile EuropeISOCoatedFOGRA27.icc cmykOut.jpg

If we do everything in one operation, the result is perfect.
convert org.png -resize 257 -background white -flatten -profile EuropeISOCoatedFOGRA27.icc icc cmyk.jpg

In this case the org.png has an ICC profile. If an image without ICC profile is used, the blocking doesn't occur, but colours are (as expected) off. If we define a 'from' profile for an image without ICC, we get the same blocky result.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting from PNG to CMYK JPG in steps give blocky ima

Post by magick »

Add -quality 92 to your command line just before your final JPEG output filename. Does that improve the result?
Post Reply