开发者

question about PNG image format the lossless data compression

开发者 https://www.devze.com 2023-02-15 02:18 出处:网络
If i take simple bitmap ( image without any compression ) and i compress it to PNG format and extract back to the original bitmap-do i get exactly the same image ?

If i take simple bitmap ( image without any compression ) and i compress it to PNG format and extract back to the original bitmap - do i get exactly the same image ?

Because the first step of the PNG compression is to do pre-开发者_JAVA技巧compression => filtering ( prediction the current pixel according the the pixel before ) on the original bitmap - and that mean that after it the image will not be same if we will extract it after the compression.


PNG uses lossless compression, so that the answer is yes, you will get the very same data after decompressing. The filtering stuff does not lose any information, it’s only a preprocessing stage to yield better compression ratios for some common sample patterns (like constant color lines or gradients).

0

精彩评论

暂无评论...
验证码 换一张
取 消