Page 1 of 1
Converting GIF to PNG losing transparency w/ 6.6.1-5+
Posted: 2010-05-18T09:21:29-07:00
by stopdropandrew
Code: Select all
>identify sitewide_sprite.gif
sitewide_sprite.gif GIF 570x250 570x250+0+0 8-bit PseudoClass 128c 10.8KB 0.000u 0:00.000
>convert -verbose sitewide_sprite.gif sitewide_sprite.png
sitewide_sprite.gif GIF 570x250 570x250+0+0 8-bit PseudoClass 128c 10.8KB 0.000u 0:00.009
sitewide_sprite.gif=>sitewide_sprite.png GIF 570x250 570x250+0+0 8-bit PseudoClass 128c 0.010u 0:00.000
convert: tRNS chunk has out-of-range samples for bit_depth `sitewide_sprite.png' @ warning/png.c/PNGWarningHandler/1457.
>identify sitewide_sprite.png
sitewide_sprite.png PNG 570x250 570x250+0+0 8-bit PseudoClass 128c 8.47KB 0.000u 0:00.299
The resulting PNG doesn't have transparency. You can find the original GIF at
http://www.kongregate.com/images/presen ... sprite.gif. I've confirmed the bug in the Mac OSX 6.6.1-5 binaries and also when I built 6.6.1-10 from source.
I have seen it work in 6.5.4-2 and 6.5.3-7 on other machines.
Re: Converting GIF to PNG losing transparency w/ 6.6.1-5+
Posted: 2010-05-18T09:36:10-07:00
by fmw42
Your gif appears to be corrupted or non-standard format. When I try on IM 6.6.1-10 Q16 Mac OSX Tiger, I get error message:
convert sitewide_sprite.gif sitewide_sprite.png
convert: tRNS chunk has out-of-range samples for bit_depth `sitewide_sprite.png' @ warning/png.c/PNGWarningHandler/1457.
Re: Converting GIF to PNG losing transparency w/ 6.6.1-5+
Posted: 2010-05-18T09:43:04-07:00
by snibgo
On Windows7, IM 6.6.0-8:
convert -verbose sitewide_sprite.gif sitewide_sprite.png
sitewide_sprite.gif GIF 570x250 570x250+0+0 8-bit PseudoClass 128c 10.8KB 0.000u 0:00.005
sitewide_sprite.gif=>sitewide_sprite.png GIF 570x250 570x250+0+0 8-bit PseudoClass 128c 0.000u 0:00.025
identify sitewide_sprite.png
sitewide_sprite.png PNG 570x250 570x250+0+0 8-bit DirectClass 8.61KB 0.000u 0:00.083
The PNG file seems to have the same transparency as the GIF.
Re: Converting GIF to PNG losing transparency w/ 6.6.1-5+
Posted: 2010-05-18T09:47:29-07:00
by magick
Most likely its a bug. We alerted the PNG developer. Stand by for a patch in the next week or two.
Re: Converting GIF to PNG losing transparency w/ 6.6.1-5+
Posted: 2010-06-16T23:45:27-07:00
by kvaster
I'm having the same problem. I'm using imagemagick-6.6.1.7 on gentoo.
Just take an png with transparency and run convert with color reduction to 256 colors. Result png will be without transparency. I need to add -type TrueColorMatte to have transparency enabled and to convert png to indexed type with help of other tool...