4 ms·
Interesting but misleading. The author applied a blur filter which allowed the non-lossy PNG format to compress better. That's not lossy PNG. The information
by emptybits 13y ago
Interesting but misleading. The author applied a blur filter which allowed the non-lossy PNG format to compress better.
That's not lossy PNG. The information is lost in the blur (or other pre-process) before PNG gets ahold of it.
- badman_ting 13y agoRight, that's the idea.
- qoiweu 13y agoThat's as true lossy as JPEG, which first "blindly" applies quantization in pre-processing step before doing RLE and Huffman compression. From the example you can see it's not a simple blur, it's side-effect of lossy application of PNG filter.
- eknkc 13y agoIsn't that the definition of a lossy format? I mean, you are right that it's not a feature of PNG, rather a side effect of some clever preprocessing but that's just semantics.
- Tloewald 13y agoHe's finessing png's lossless compression by removing detail from the source image. So it's lossy compression using a lossless file format (just like you can reduce the palette of an image and the dithering algorithm to reduce gif file sizes).
- Terretta 13y agoInteresting but misleading. The author applied a blur filter which allowed the non-lossy PNG format to compress better. That's not lossy PNG. The information is lost in the blur (or other pre-process) before PNG gets ahold of it. As I understood it, I think that's opposite of what he's saying. He's saying blur helps restore info. From the description, I understood the information is lost by deliberately omitting certain pixels that PNG rendering will try to restore from adjacent pixel data, and that he did a diagonal blur to influence the adjacent pixels to contribute better data to the missing ones. Blurring spread info into diagonally adjacent pixels improving results of using them to reconstruct missing ones. // source is invoking three png utils, so didn't dig into what it's really doing, just saying I think the explanation is that reconstructing pixels saves space and reconstruction is improved by letting diagonal neighbors contain more info on reconstructed pixel through blur.
- maaku 13y agoIncorrect. PNG does not do reconstruction, just delta compression. By applying a diagonal blur, he is removing entropy in a way that the lossless compressor is likely to take advantage of.
- Terretta 13y agoI didn't say PNG did anything, so I'm neither correct nor incorrect about what PNG does (though on second read compressing is a better word than omitting, though either way the "guessed" pixel is where the information goes missing). I'm disputing parent's claim author said savings was from blur. He didn't. He said: > PNG has an ability to “guess” pixels based on their top and left neighbors and successful guesses compress to almost nothing. Usually only few pixels match a guess, but latest ImageAlpha's “Blurizer” option manipulates image data to match the guesses, making compression much much more effective.
- maaku 13y agoWhat he said is correct.
- batbomb 13y agoBlur is a low-pass filter, filtering out higher frequencies in the image. It's the exact same steps as you use with compression. The difference is that you're not using additional transforms and their coefficients to mitigate artifacts and/or slightly improve quality.
- coldtea 13y ago>That's not lossy PNG. You'd be surprised.
- lambda 13y agoThey are changing the encoder in such a way that the resulting PNG does not decode exactly, but instead approximates the original image. This turns it into a lossy process. It doesn't really matter if this process happens before or after the PNG encoding step (in fact, from how they describe it, it sounds like it it is integrated into the PNG encoding process, not simply a pre-processor); the combined process of any filtering and PNG encoding is lossy, as in it does not preserve all information necessary to produce a bit-identical output.