19

I have just learned that PNG is a lossless image format while BMP can be both uncompressed or lossless format. Should there be a quality difference between these two? If not, does it mean that other lossless formats like TIFF, JPEG2000 and PNG offer the same quality as BMP?

slhck
  • 223,558
  • 70
  • 607
  • 592
user1032421
  • 307
  • 2
  • 4
  • 6
  • 5
    JPEG2000 is **not always lossless**. You can use it lossless, but mostly, it's used to compress images in a lossy way. – slhck Feb 04 '12 at 22:10

3 Answers3

21

BMP is both uncompressed and lossless. PNG is compressed but lossless. Thus, with a lossless format the only visible difference is the file size. I'd recommend using PNG over BMP unless you can't for compatibility reasons.

iglvzx
  • 23,459
  • 13
  • 85
  • 122
  • 1
    You said _visible_ difference. Should there really be any difference except for file size? – user1032421 Feb 04 '12 at 22:13
  • 4
    That is correct. The pixels will be 1:1. – iglvzx Feb 04 '12 at 22:15
  • 2
    PNG also supports transparency while BMP doesn't. – dnbrv Feb 05 '12 at 04:05
  • 7
    BMP does support alpha channel (transparency) [since Windows 95](http://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.28bitmap_information_header.29). Just that Paint in Windows does not save the file with transparency (for compatibility reason?), which I think *might* have been the source of misconception. – nhahtdh Apr 06 '13 at 21:59
8

There's no quality difference between BMP & PNG format (except PNG is compressed using deflate algorithm).

BMP8 can be compressed using RLE (run-length-encoding) algorithm, but BMP16/24/32/64 doesn't support compression yet.

BMP32 support alpha channel just like PNG32 support transparency.

Tidy Star
  • 81
  • 1
  • 1
2

No difference in quality, both standards are lossless. BMP uncompressed takes more space, but when compressed (e.g. when put in a .zip or .7z file) BMP can be better.

Having done some experiments, I saved a photo in BMP and in PNG, and compressed both files. (.zip) The BMP was 1.8% bigger, but that would vary between photos.

If you are compressing photos, it makes no difference.

However simple picture, such as a drawing you did in paint, or a diagram, will compress much better with .bmp rather than .png.

I again, tested this. I did a logo in paint (similar to a ford logo) and compressed it with 7zip. Uncompressed, the png was 136kb, the bmp 1.7 MB. Compressed, the png was ~100kb and the bmp was 18kb.

If you want to compress pictures, save in .bmp. If not, use .png.

Both when compressed whooped jpeg btw.

  • I confirm this. Illustration images tend to compress so much better in BMP than PNG. Difference is like day and night in some occasion, 10GB of images could be compressed to mere 100MB while PNG couldn't even reach under 95% compression ratio. – Skyvory Jan 22 '21 at 13:51