Converting XPM to BMP
Posted: 2018-02-15T17:02:26-07:00
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.
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.