5 ms·
I hope you're aware imgur compresses images that you upload to it regardless of whether they were already compressed.
by crynix 14y ago
I hope you're aware imgur compresses images that you upload to it regardless of whether they were already compressed.
- mistercow 14y agoMaybe they do that for lossy images, but I just compared what's on imgur to the original on my computer, and it is pixel-for-pixel identical. They did shave about 7KB off of it though, so maybe they push PNGs through pngout or similar. I mean, as far as I know, there aren't even any practically useful algorithms out there for doing lossy compression on PNGs (although there should be).
- nitrogen 14y agoFireworks, pngquant, and png-nq have quantization algorithms that will dither a 32-bit PNG with alpha down to 8-bit palletized PNGs with alpha. The palette selection algorithms the free tools use (I haven't used Fireworks) sometimes drop important colors used in only a small section of an image, resulting in a blue power LED losing its blue color.
- mistercow 14y agoYeah, technically that's lossy compression, but what I meant was lossy 32-bit PNG; that is, a preprocessing step before the prediction step which makes the result more compressible by the final DEFLATE step while having a minimal impact on quality.
- nitrogen 14y agoThat sounds very interesting. I wonder what kinds of transforms would improve compressibility by DEFLATE. I know a bit about PNG's predictors, but not enough about DEFLATE to confidently guess. If you ever work on this, please let me know. I'd like to collaborate.
- nitrogen 14y agoEven if imgur did use a lossy format (which it didn't), you can see a difference between the top and bottom halves of that single image.