OK, so I have an XPM file that is about 23x39 pixels, or about 7.3kb in size.
I want to convert this to a 64x96 pixel BMP file, using 256 colors per pixel.
So I try
magick image.xpm -resize 64x96 -colors 256 BMP2:image.bmp
The BMP file is now 18kb, and the bit depth is 24, not good.
If I use AhaView to convert to 8bpp BMP, the file goes down to approx. 7kb. much better.
I suspect that IM is turning the 8-bit palette plus 8 bits/pixel XPM file into a no-palette and three bytes/pixel BMP file.
What incantation do I use to get IM to make an 8bpp BMP file?
I need the smaller file for an embedded application (not much memory) and do not have a fancy embedded BMP reader that can decompress encoded BMP files.
Converting XPM to BMP
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Converting XPM to BMP
try
magick image.xpm -resize 64x96 +dither -colors 256 -depth 8 -type palette BMP2:image.bmp
magick image.xpm -resize 64x96 +dither -colors 256 -depth 8 -type palette BMP2:image.bmp
Re: Converting XPM to BMP
Amazing. Worked perfectly.
Take the rest of the day off. Tell them some guy on the internet said it was OK!
thanks again,
tony o.
Take the rest of the day off. Tell them some guy on the internet said it was OK!
thanks again,
tony o.