possible bug with alpha channel in bmp
Posted: 2010-02-23T22:08:12-07:00
IM 6.5.9-10 Q16 Mac OSX Tiger.
Trying to convert a png with alpha channel to bmp with alpha channel. This page http://www.imagemagick.org/Usage/formats/#bmp seems to imply that bmp supports 32-bit image (24 rgb + 8 alpha).
"The presence of any transparency controls whether it uses a 24 (RGB) or 32
bit (RGBA) format BMP image. You can use "+matte" to turn off transparency
in an image."
I tried
convert logo: -resize 50% -transparent white logo2t.png
convert logo2t.png -channel rgba -alpha on -depth 8 logo2t.bmp
but no alpha channel is visible although there appears to be alpha in the verbose info.
Is this correct? Am I misunderstanding something?
Thanks
Fred
P.S. The alpha channel in the png seems to backwards.
convert logo: -resize 50% -transparent white logo2t.png
This looks fine. But
identify -verbose logo2t.png
...
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 1-bit
Channel statistics:
Red:
min: 0 (0)
max: 65279 (1)
mean: 228.346 (0.895475)
standard deviation: 68.9325 (0.270324)
kurtosis: 4.60678
skewness: -2.49081
Green:
min: 23 (0.0901961)
max: 65279 (1)
mean: 229.039 (0.898191)
standard deviation: 60.8313 (0.238554)
kurtosis: 3.02552
skewness: -2.15154
Blue:
min: 24 (0.0941176)
max: 65279 (1)
mean: 232.265 (0.910842)
standard deviation: 53.6033 (0.210209)
kurtosis: 4.29012
skewness: -2.32609
Alpha:
min: 255 (1)
max: 0 (0)
mean: 52.8793 (0.20737)
standard deviation: 103.383 (0.405423)
kurtosis: 0.0839255
skewness: -1.44358
Min should be 0 and Max should be 255
Trying to convert a png with alpha channel to bmp with alpha channel. This page http://www.imagemagick.org/Usage/formats/#bmp seems to imply that bmp supports 32-bit image (24 rgb + 8 alpha).
"The presence of any transparency controls whether it uses a 24 (RGB) or 32
bit (RGBA) format BMP image. You can use "+matte" to turn off transparency
in an image."
I tried
convert logo: -resize 50% -transparent white logo2t.png
convert logo2t.png -channel rgba -alpha on -depth 8 logo2t.bmp
but no alpha channel is visible although there appears to be alpha in the verbose info.
Is this correct? Am I misunderstanding something?
Thanks
Fred
P.S. The alpha channel in the png seems to backwards.
convert logo: -resize 50% -transparent white logo2t.png
This looks fine. But
identify -verbose logo2t.png
...
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 1-bit
Channel statistics:
Red:
min: 0 (0)
max: 65279 (1)
mean: 228.346 (0.895475)
standard deviation: 68.9325 (0.270324)
kurtosis: 4.60678
skewness: -2.49081
Green:
min: 23 (0.0901961)
max: 65279 (1)
mean: 229.039 (0.898191)
standard deviation: 60.8313 (0.238554)
kurtosis: 3.02552
skewness: -2.15154
Blue:
min: 24 (0.0941176)
max: 65279 (1)
mean: 232.265 (0.910842)
standard deviation: 53.6033 (0.210209)
kurtosis: 4.29012
skewness: -2.32609
Alpha:
min: 255 (1)
max: 0 (0)
mean: 52.8793 (0.20737)
standard deviation: 103.383 (0.405423)
kurtosis: 0.0839255
skewness: -1.44358
Min should be 0 and Max should be 255