still bug with transparency in PNG IM 6.6.7.7

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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

still bug with transparency in PNG IM 6.6.7.7

Post by fmw42 »

convert -version
Version: ImageMagick 6.6.7-7 2011-02-13 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features:

Mac OSX Tiger (Powerpc)

Glenn,

1) The following still shows no transparency

convert logo: -transparent white -type palettematte PNG8:logo_test1.png


2) And the following also shows no transparency

convert logo: -transparent white miff:- | convert - -type palettematte PNG8:logo_test2.png

3) But the following works:

convert logo: -transparent white gif:- | convert - -type palettematte PNG8:logo_test3.png

Fred
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: still bug with transparency in PNG IM 6.6.7.7

Post by glennrp »

I'm fighting situations where the PNG decoder has to guess whether it's the colormap that is bogus or the pixel opacities that are bogus. Every time I sqash one of those, then we start losing transparency again. In this particular case (my "problem 41") the PNG decoder is handed image->matte==MagickTrue and a 256-color colormap with no transparent entry. If I fix that, then my "problem 42" will be broken again. It seems that if I omit the "-type palettematte" option I get what you want (except the wizard's beard is transparent so you probably want to do a floodfill instead.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: still bug with transparency in PNG IM 6.6.7.7

Post by fmw42 »

Glenn,

OK. I can live with

convert logo: -transparent white gif:- | convert - -type palettematte PNG8:logo_test3.png

until you find a better solution.


I was just reminding you of the problem that you had noted earlier and was not sure if you had thought you had implemented a solution, yet, that was not working again. But apparently you are on top of it, but have not a good solution, yet, to implement. So I can wait.

Thanks

Fred
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: still bug with transparency in PNG IM 6.6.7.7

Post by glennrp »

I am also losing transparency if I write a MIFF instead of a PNG. It seems that
the "-type palettematte" option is the source of the problem, not the PNG encoder.

Glenn
Post Reply