3 ms·
Replying to myself because I just tested it. • Lenna.png (http://i.imgur.com/pPNbiyG.png http://i.imgur.com/pPNbiyG.png): 475KB. • Lenna.Hilbertized.png (http
by derefr 11y ago
Replying to myself because I just tested it.
• Lenna.png (http://i.imgur.com/pPNbiyG.png http://i.imgur.com/pPNbiyG.png): 475KB.
• Lenna.Hilbertized.png (http://i.imgur.com/kU8C3yG.png http://i.imgur.com/kU8C3yG.png): 709KB.
Clearly, not a good idea, at least for photographic sources.
- astrange 11y agoThat idea isn't too bad, it probably works most places but fails very badly in a few spots. So it might be good for lossy compression - I actually tried this once, but lost the code a while back... In this case, PNG's filtering makes it kind of 2D-aware, so that probably works better on the original. But if you tried splitting it into 8x8 blocks, then predicting each one from the left-upperleft-upper neighbors, well, you'd have the basics to modern DCT codecs.
- poizan42 11y agoIt interferes with the filtering. You should try to first filter, then "Hilbertize" and then deflate