Quote:
Originally Posted by dwig
Correct for ZIP archives, but not so with PNG.
PNG (Portable Network Graphic) is a bitmap format and not a compression algorithm. PNG images can be compressed or uncompressed, and if compressed can use either lossless or lossy compression. It is quite false to assume that PNGs are compressed or that if compressed the compression is lossless.
|
This is mostly incorrect, though you're right that uncompressed PNGs are also allowed. But the standard allows only one compression algorithm, which is the (lossless) deflate algorithm. See
the PNG specification:
Quote:
PNG compression method 0 (the only compression method presently defined for PNG) specifies deflate/inflate compression with a 32K sliding window. Deflate compression is an LZ77 derivative used in zip, gzip, pkzip and related programs…
|
Some image encoders may do a lossy pre-pass to decrease file size (using things like Blurilizer and quantization filters) before they encode to PNG. But they are effectively editing the image in a lossy manner prior to encoding it as a PNG; any conforming PNG encoder/decoder will decode to a byte-for-byte identical copy of the image that was encoded.
You could obviously do lossy pre-processing on any format, and you wouldn't say that FLAC is lossy just because someone chose to do a pre-pass on the data to lower the effective bitrate before FLAC-encoding it.