Page 1 of 1

Convert with resize made image darker

Posted: 2012-07-15T09:48:25-07:00
by cerberusss
This has me stumped... when converting an image with the resize option, it became darker.

Image comes from a client using Photoshop CS5: clock_88x88.png
I also want a smaller version so I run:

Code: Select all

$ convert clock_88x88.png -resize 50% clock_44x44.png
Result: clock_44x44.png

Code: Select all

$ identify clock_88x88.png 
clock_88x88.png PNG 88x88 88x88+0+0 8-bit DirectClass 5.71KB 0.000u 0:00.010
$ identify clock_44x44.png 
clock_44x44.png PNG 44x44 44x44+0+0 8-bit PseudoClass 256c 1.06KB 0.000u 0:00.000
What went wrong?

------------
Version: ImageMagick 6.7.8-0 2012-07-05 Q16
Compiled via MacPorts, running on a MacBook Pro, with OS X 10.7.4
MacPorts output: ImageMagick @6.7.8-0 (graphics, devel) Variants: graphviz, hdri, jbig, jpeg2, lqr, mpeg, no_plus_plus, no_x11, pango, perl, [+]q16, q32, q8, rsvg, universal, wmf

Re: Convert with resize made image darker

Posted: 2012-07-15T11:10:05-07:00
by fmw42
I would say it is a bug converting from truecoloralpha to palettealpha and it happens for me on my IM 6.7.8.3 beta Q16 Mac OSX Snow Leopard

But this works fine for me on IM 6.7.8.3 beta Q16 Mac OSX Snow Leopard

convert clock_88x88.png -resize 50% -type truecolorAlpha clock_44x44.png

Re: Convert with resize made image darker

Posted: 2012-07-15T16:25:33-07:00
by glennrp
Please try IM-6.7.8-3.

The clock_88x88.png file is a truecolor PNG (colortype 6) and contains an iCCP profile that we recognize as sRGB.
There are more than 256 RGBA different entries in the palette, before and after resizing to 50%.

Re: Convert with resize made image darker

Posted: 2012-07-17T03:13:23-07:00
by cerberusss
OK thanks. I've converted them manually with Photoshop (only a couple of files) in the meantime. I'll wait for the port to update.