I am running into something strange when I use convert to change an uncompressed .bmp file into a compressed .bmp file. I use the command:
convert in.bmp -colors 256 out.bmp
which should use the RLE compression that is default for .bmp files. I also tried:
convert in.bmp -colors 256 -compress RLE out.bmp
but in both cases, the compressed image ended up being about twice the size of the original, when it of course should have been smaller. Would anyone be able to explain what's going on? I am using Image Magick 6.5.3 on Ubuntu.
Thanks in advance.
BMP compression with convert
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: BMP compression with convert
If you are on a Q16 install of IM, then add -depth 8 to your command
Re: BMP compression with convert
Thanks for the idea, but I'm using a Q8 install. And after some further investigation, it seem that the images I'm using are not well suited for RLE compression, so the extra compression data ends up making the file larger instead of smaller.