Page 1 of 1

possible bug in transparency with png in IM 6.5.2-4

Posted: 2009-05-13T11:01:53-07:00
by fmw42
IM 6.5.2-4 Q16 Mac OSX Tiger.

I seem to be having trouble making white into transparent. These do not work for some reason. Perhaps I am missing something, but it seems to be straight-forward and similar to what I have done in the past.

convert -size 100x100 gradient: -threshold 50% -transparent white gradtmp1.png

convert \( -size 100x100 gradient: -threshold 50% \) \( +clone -negate \) -compose copy_opacity -composite gradtmp2.png

I simply get a half white (top) and half black (bottom) result with no transparency.

identify -verbose gradtmp1.png
Image: gradtmp1.png
Format: PNG (Portable Network Graphics)
Class: PseudoClass
Geometry: 100x100+0+0
Resolution: 72x72
Print size: 1.38889x1.38889
Units: Undefined
Type: Grayscale
Base type: Grayscale
Endianess: Undefined
Colorspace: RGB
Depth: 16-bit
Channel depth:
gray: 1-bit
Channel statistics:
gray:
min: 0 (0)
max: 65535 (1)
mean: 32767.5 (0.5)
standard deviation: 32767.5 (0.5)
kurtosis: -2
skewness: 1.33233e-14
Colormap: 65536


And this results in a totally black image:

convert -size 100x100 gradient: -threshold 50% -fill none -opaque white gradtmp3.png

I tried rebooting my computer with no success. I am not trying to make distclean and then reinstall from scratch. I will let you know if any difference afterwards.

Unfortunately a reinstall of IM did not fix the problem.

UPDATE:

Seems to be a png problem. These work with gif output:

convert -size 100x100 gradient: -threshold 50% -transparent white gradtmp1.gif

convert \( -size 100x100 gradient: -threshold 50% \) \( +clone -negate \) -compose copy_opacity -composite gradtmp2.gif

Re: possible bug in transparency with png in IM 6.5.2-4

Posted: 2009-05-13T17:05:47-07:00
by anthony
fmw42 wrote:

Code: Select all

convert -size 100x100 gradient: -threshold 50% -transparent white gradtmp1.png
I have verified that the above two color image did not save transparency into the PNG
And yet replacing the save with a show: or x: does show that the image has transparency.

Good pickup Fred. The PNG coder was modified to allow more expert control of the coder, though I myself am trying to get more details for documenting in IM Examples, Formats, PNG.

Re: possible bug in transparency with png in IM 6.5.2-4

Posted: 2009-05-14T09:36:46-07:00
by fmw42
Magick,

Any timeframe, yet, on this fix?

Thanks

Fred

Re: possible bug in transparency with png in IM 6.5.2-4

Posted: 2009-05-14T09:44:24-07:00
by magick
Already fixed. Grab ImageMagick 6.5.2-5 Beta from ftp://magick.imagemagick.org/pub/ImageMagick/beta.

Re: possible bug in transparency with png in IM 6.5.2-4

Posted: 2009-05-14T21:05:07-07:00
by anthony
yeap its fixed.