Question

Is was wondering, if exists a significant difference in the decompression process of these two types of image, which is slower, JPEG or PNG?

Was it helpful?

Solution

The many commenters here who say "it depends" are wrong. PNG decompression is always slower than JPG decompression, in every study that has been reported. Plus I personally have verified this in several different projects.

There is no such thing as an uncompressed PNG, despite greg's assertion to the contrary. All PNGs are compressed, and the compression of all PNGs is lossless. And decompressing all PNGs is sorta slow, compared to comparable JPGs.

All JPGs are compressed too, but JPG compression is always lossy. In particular, JPEG at 100 quality is NOT uncompressed. Quality 100 still has lossy compression, despite Ed S.'s assertion to the contrary. Please stop upvoting his comment.

OTHER TIPS

There are way too many factors at play here. Consider the two formats. PNG images if compressed are compressed with zlib, which is a lossless compression. Therefore, you could measure the performance of decompression of PNG based on the decompression rate of zlib. PNGs do not have to be compressed though (no zlib compression performed).

JPEG is a completely and utterly different beast. There are dozens of different encodings of JPEGs, not to mention JPEG-Lossless. There is JPEG arithmetic encodings (formerly patented) and the more common JPEG Huffman encodings, along with dozens of combinations of each. There are way too many variables in JPEG images to get into.

Unfortunately, there's not going to be a good answer to this question. There's just not enough information to give a definitive answer. Even if there was, it would be extremely application specific, or worse, interaction with your application specific.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top