Hi,
When I convert a 32-bit BMP to a 24-bit BMP the alpha channel displays as black in the
result. I'd like to change this to another colour (white).
It must be easy ... but after four hours of searching I'm still stuck. Can someone put me
out of my misery with a quick one liner.
Thanks, Steve.
BMP4 to BMP3 - changing alpha from black to white?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: BMP4 to BMP3 - changing alpha from black to white?
I don't know much about bmp image, but see http://www.imagemagick.org/Usage/formats/#bmp
and also try
convert bmp32bit -background somecolor -flatten bmp24bit
and also try
convert bmp32bit -background somecolor -flatten bmp24bit
Re: BMP4 to BMP3 - changing alpha from black to white?
Hi,
From the file format reference it's clear that IM is no fan of bmp file formats.
Fortunately I also have my reference image as a .png. I can convert this
to BMP3 and BMP4 without problem:
BMP3 on white background:
convert -size 256x256 xc:white infile.png -composite BMP3:outfile.bmp
BMP4 with alpha channel:
convert infile.png outfile.bmp
I'm sure there are better ways but I'll stick with this and helpfully keep my sanity.
Thanks, Steve.
From the file format reference it's clear that IM is no fan of bmp file formats.
Fortunately I also have my reference image as a .png. I can convert this
to BMP3 and BMP4 without problem:
BMP3 on white background:
convert -size 256x256 xc:white infile.png -composite BMP3:outfile.bmp
BMP4 with alpha channel:
convert infile.png outfile.bmp
I'm sure there are better ways but I'll stick with this and helpfully keep my sanity.
Thanks, Steve.