Much larger file when converting JPG to BMP

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
kelleyk

Much larger file when converting JPG to BMP

Post by kelleyk »

Hello,

I need to convert multiple JPG files to BMP for a particular application I have and the problem is that after the conversion the BMP files are anywhere from 7 to 10 times larger than the JPG. Is there anyway to get this to approx. the same size as the original JPG? I have tried resizing it and it made no difference. Any help would be much appreciated,

kelleyk
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France
Contact:

Normal

Post by Clo »

:) Hello !
• This is quite normal, because JPEG is a compressed format, while BMP is not…
You could reduce the BMPs sizes saving them as a lower colour-depth (i.e. 256-colour) if that doesn't matter…

:mrgreen: Kind regards,
Claude
Clo
Old user ON SELECTIVE STRIKE till further notice
kelleyk

Thanks

Post by kelleyk »

Thanks Claude... I was mistaken on the resizing... I was able to reduce it to 50% of the original size and get it down to a managable size... It is actually B/W scanned images already so changing it to grayscale or modifying the color depth doesn't really do anything. Thanks for the reply though...

kelleyk
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Thanks

Post by helmut »

kelleyk wrote:Thanks Claude... I was mistaken on the resizing... I was able to reduce it to 50% of the original size and get it down to a managable size... It is actually B/W scanned images already so changing it to grayscale or modifying the color depth doesn't really do anything. Thanks for the reply though...

kelleyk
B/W image in JPG formats sounds a bit strange. I think for your images GIF, TIF or PNG formats would be perfect and reduce image size dramatically. All these image formats work very well for images with low number of colours, especially TIF and it's LZW compression is strongly used in the area of faxes.

If the other applications really needs BMP files, you might try RLE compression of the BMP format. (Button "Options" on save dialog). Perhaps the other application supports this. If you use a JPG image with few colours (<=256) and want to save it as BMP, make sure you convert it to an image with colour palette (e.g. "Image > Convert to colours"), otherwise the BMP file will have 24 bit colour depth.

Please see the Drahken's FAQ articles "What format should I save this image in?" and "Common graphic formats" for various background info on graphic formats.
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Post by Drahken »

1) BMPs will always have a much larger filesize than an identical image in any other format. As previously stated, BMPs are uncompressed.

2) Reduce colors to bitonal or greyscale (even if the image appears to only be in B&W, it'll usually have a few shades of grey to make the edges smoother). Even though the image only contains B&W (or a few shades of grey), the image is saved with thousands of colors. This, obviously inflates the filesize even more. If you reduce the image to bitonal or greyscale before saving, then it'll only save it with 2 (or 16 or 256, if you reduced it to one of the greyscale options), this will make for a much smaller filesize. It will also allow for RLE compression.

3) The BMP format does allow for RLE compression, which will greatly reduce the filesize. There are 2 problems with it though. 1) Not all programs can accept RLE compressed BMPs. 2) RLE doesn't work on 24-bit images, you have to reduce it to 256 colors or less (that includes bitonal and greyscale) in order to use RLE.
Post Reply