IM 6.6.8.10 Q16 Mac OSX Tiger, libpng 1.5.4
There have been many changes and improvements to the handling of PNG. Many thanks to Glenn. Forgive my ignorance, but how does one create for example an 8-bit PNG with one transparent color. I have tried many variations of:
This seems to work:
convert logo: -transparent white PNG8:tmp.png
identify -verbose tmp.png
Image: tmp.png
Format: PNG (Portable Network Graphics)
Class: DirectClass <--- is this correct
Geometry: 640x480+0+0
Resolution: 72x72
Print size: 8.88889x6.66667
Units: Undefined
Type: PaletteMatte
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 1-bit
...
Alpha: rgba(255,255,255,0) #FFFFFF00
Histogram:
7150: ( 4, 7, 7,255) #040707 rgba(4,7,7,1)
136: ( 6, 9, 14,255) #06090E rgba(6,9,14,1)
111: ( 6, 10, 16,255) #060A10 rgba(6,10,16,1)
68: ( 9, 13, 19,255) #090D13 rgba(9,13,19,1)
120: ( 9, 14, 25,255) #090E19 rgba(9,14,25,1)
55: ( 10, 11, 11,255) #0A0B0B rgba(10,11,11,1)
But this does not:
convert logo: -transparent white -depth 8 -type palettematte PNG8:tmp.png
identify -verbose tmp.png
Format: PNG (Portable Network Graphics)
Class: PseudoClass
Geometry: 640x480+0+0
Resolution: 72x72
Print size: 8.88889x6.66667
Units: Undefined
Type: Palette
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
...
Histogram:
6931: ( 4, 7, 7) #040707 rgb(4,7,7)
362: ( 6, 9, 14) #06090E rgb(6,9,14)
108: ( 6, 10, 16) #060A10 rgb(6,10,16)
69: ( 9, 13, 19) #090D13 rgb(9,13,19)
107: ( 9, 14, 25) #090E19 rgb(9,14,25)
73: ( 10, 11, 11) #0A0B0B rgb(10,11,11)
Is the above working correctly?