26th May 2015
I am using an excellent photo-management suite digiKam, which offers 3 lossless compressed formats for photos versioning and storage: PNG, JPEG 2000, and PGF. I wanted to know which one should I use, which urged me to perform this comparison.
This post is not intended to be an in-depth comparison, but should be sufficient to choose one of the three file formats for your purposes. For more format details and history simply follow the links provided. File formats are reviewed roughly in “historical” order.
- It is lossless.
- It is suitable for photos.
- PNG is more space-efficient in the case of images with many pixels of the same color, such as diagrams/plots (as compared to PGF and JPEG2000). However, PNG photos are almost always larger than lossless PGF/JPEG2000 photos (real photo example: 9.9 MB in PNG, 7.0 MB in JPEG 2000).
- PNG is fairly fast at (en|de)coding.
- PNG is widely supported by web-browsers, image editors, and other software.
- PNG uses CRCs internally for each data block, so if damage occurs only the damaged block(s) should be lost – theoretically. However, in practice, according to the Just One Bit paper (local copy), PNG is actually much less damage-resilient than JPEG 2000.