Hi,
I am using convert to process images. The inputs and output are
PNGs which has some completely transparent pixels. identify -verbose
on an input file has a line like this:
Alpha: (255,255,255,255) #FFFFFFFF
Identify -verbose has a line on the output image like this:
Alpha: ( 0, 0, 0,255) #000000FF
The full output from both commands is at the end of this message.
When a user views the output image in a program known to not
completely support PNG, the pixels of the output image that should be
transparent are black. My guess is that this program is tossing out
the alpha channel entirely, and the alpha color #000000FF becomes
#000000, or black. I would like to make the alpha color #FFFFFFFF, so
that transparent pixels become white when transparency is dropped.
Can I chose the alpha color in ImageMagick? If so, how?
Sam
Here is the complete text of 'identify -verbose' on one input image,
and the output image:
$ identify -verbose input.png
input.png PNG 16x16 16x16+0+0 DirectClass 917
Image: input.png
Format: PNG (Portable Network Graphics)
Geometry: 16x16
Class: DirectClass
Type: PaletteMatte
Endianess: Undefined
Colorspace: RGB
Channel depth:
Red: 8-bits
Green: 8-bits
Blue: 8-bits
Alpha: 1-bits
Channel statistics:
Red:
Min: 0 (0)
Max: 255 (1)
Mean: 129.211 (0.50671)
Standard deviation: 91.8054 (0.360021)
Green:
Min: 36 (0.141176)
Max: 255 (1)
Mean: 158.676 (0.622258)
Standard deviation: 72.7319 (0.285223)
Blue:
Min: 70 (0.27451)
Max: 255 (1)
Mean: 183.941 (0.721339)
Standard deviation: 59.4515 (0.233143)
Alpha:
Min: 255 (1)
Max: 0 (0)
Mean: 207.188 (0.8125)
Standard deviation: 99.5297 (0.390312)
Alpha: (255,255,255,255) #FFFFFFFF
Colors: 196
Histogram:
1: ( 0, 36, 72, 0) #00244800
1: ( 7, 41, 71, 0) #07294700
1: ( 6, 41, 72, 0) #06294800
1: ( 6, 42, 74, 0) #062A4A00
1: ( 5, 43, 76, 0) #052B4C00
1: ( 11, 42, 70, 0) #0B2A4600
1: ( 11, 42, 71, 0) #0B2A4700
1: ( 9, 43, 74, 0) #092B4A00
1: ( 1, 43, 80, 0) #012B5000
1: ( 9, 47, 82, 0) #092F5200
(Lots more colors)
1: (252,252,252, 0) grey99
12: (255,255,255, 0) white
48: (255,255,255,255) #FFFFFFFF
Rendering-intent: Undefined
Resolution: 72x72
Units: Undefined
Filesize: 917
Interlace: None
Background Color: #00000000
Border Color: #DFDFDF00
Matte Color: grey74
Page geometry: 16x16+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: Undefined
Signature: 0d08bc2f98457ea61361928695a2ecb5b374fec55383380a3b8ab384faa63faa
Tainted: False
Version: ImageMagick 6.2.4 10/02/07 Q16 http://www.imagemagick.org
$ identify -verbose output.png
output.png PNG 360x99 360x99+0+0 DirectClass 18kb
Image: output.png
Format: PNG (Portable Network Graphics)
Geometry: 360x99
Class: DirectClass
Type: TrueColorMatte
Endianess: Undefined
Colorspace: RGB
Channel depth:
Red: 8-bits
Green: 8-bits
Blue: 8-bits
Alpha: 1-bits
Channel statistics:
Red:
Min: 0 (0)
Max: 255 (1)
Mean: 107.634 (0.422094)
Standard deviation: 100.016 (0.39222)
Green:
Min: 0 (0)
Max: 255 (1)
Mean: 134.531 (0.527572)
Standard deviation: 84.7832 (0.332483)
Blue:
Min: 0 (0)
Max: 255 (1)
Mean: 162.94 (0.638981)
Standard deviation: 84.7234 (0.332249)
Alpha:
Min: 255 (1)
Max: 0 (0)
Mean: 219.347 (0.860185)
Standard deviation: 88.4327 (0.346795)
Alpha: ( 0, 0, 0,255) #000000FF
Colors: 1884
Rendering-intent: Undefined
Resolution: 72x72
Units: Undefined
Filesize: 18kb
Interlace: None
Background Color: black
Border Color: #DFDFDF00
Matte Color: grey74
Page geometry: 360x99+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: Undefined
Signature: 9d966b7f7e6d53a36948652aad751f68cd388d98652dc9d91dd35bfc7353dac2
Tainted: False
Version: ImageMagick 6.2.4 10/02/07 Q16 http://www.imagemagick.org
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users