3 ms·
As has been pointed out by others before, while dithering is stylistic and useful for display in low color resolution screens, dithered images compress poorly.
by fluoridation 4y ago
As has been pointed out by others before, while dithering is stylistic and useful for display in low color resolution screens, dithered images compress poorly. You'll almost always get more detail and color out of JPEG. At 30% quality I get a 43 KiB file, and the difference is much less noticeable than if I had tried to quantize down to two colors.
Now, if the point is aesthetics and not efficiency, by all means use dithering.
- bob1029 4y ago> dithered images compress poorly If you think about error diffusion dithering in particular on a 1-bit palette - Information theory dictates that you are kind of pushing entropy limits as-is. Compression is still possible, but to get any kind of realistic gain it's going to have to be slow compression. Piping stuff like 1-bit dithered graphics through fast, lossy JPEG/MPEG-style compressors (i.e. quantized DCT) will yield absolute garbage results.
- jarenmf 4y agoCould you please elaborate on the link of error diffusion to information theory? as far as I understand error diffusion minimizes the quantization error for lower frequencies on the expense of adding more noise to higher frequencies. i.e it seems to be only optimizing for human perception
- bob1029 4y agoYou're right - in pure information theoretic terms there is nothing special happening here. It's a tradeoff like always. But, in human perceptual terms (i.e. how JPEG/MPEG are designed), you may find substantial gain in useful information per bit by applying dithering. The useful amount of information represented by any given bit of data is much larger in this arrangement. 1 bit = 1 entire pixel. In other schemes, you have upwards of 24 bits representing the contents of 1 pixel. To human eyes, only 8 of these bits really matter. You can usually throw away 50% of the other 16 without anyone noticing.
- Someone 4y ago>> dithered images compres poorly > Piping stuff like 1-bit dithered graphics through fast, lossy JPEG/MPEG-style compressors (i.e. quantized DCT) will yield absolute garbage results. Of course dithered images compress poorly when using compression algorithms that aren’t designed for them, but I don’t see why, a priori, they should when the choice of compressor is free. That current compressors for photos are better than those for dithered graphics may only be because there has been way more research in compression of photos than in that of dithered pictures. You could, for example, try to compress a dithered image not by running a JPEG compressor designed for photographic images, but by searching for (search algorithm TBD) a low quality JPEG file that, when dithered, produces an image that is perceptually similar to the original dithered image. For photos, I would expect that JPEG file to look better than its dithered version, but if the input is a dithered photo, I’m not sure. Even if it is, such an approach might still be useful. And JPEG likely isn’t the optimal compressed format. But dithered images is a niche market, so I don’t expect we’ll ever know how good these images can be compressed. Even the demo scene probably won’t work on this. They wouldn’t build a generic compressor, just one that compresses the images in their current demo well.
- tedunangst 4y agoIn a sense, JPEG is fancy dithering. The DCT gives you a dithering pattern customized for exactly the image you're compressing, every dot placed to minimize error. (With some hand waving.)
- mikae1 4y ago...and when you compare the size of JPEG with AVIF[1], dithered PNG may seem even more wasteful and pointless. [1] https://afontenot.github.io/image-formats-comparison/#abandoned-factory&avif=s&jpg=s https://afontenot.github.io/image-formats-comparison/#abando...