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
possible bug in transparency with png in IM 6.5.2-4
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: possible bug in transparency with png in IM 6.5.2-4
I have verified that the above two color image did not save transparency into the PNGfmw42 wrote:Code: Select all
convert -size 100x100 gradient: -threshold 50% -transparent white gradtmp1.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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug in transparency with png in IM 6.5.2-4
Magick,
Any timeframe, yet, on this fix?
Thanks
Fred
Any timeframe, yet, on this fix?
Thanks
Fred
Re: possible bug in transparency with png in IM 6.5.2-4
Already fixed. Grab ImageMagick 6.5.2-5 Beta from ftp://magick.imagemagick.org/pub/ImageMagick/beta.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: possible bug in transparency with png in IM 6.5.2-4
yeap its fixed.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/