Websites should not use dithered images
11–20 of 133 posts
Re: Websites should not use dithered images
#12Dithering is a technique which allows you to represent a color image with a very limited palette, in particular a two bit palette. The result is not much like a normal photo, but much better than nothing if you have a machine that can only output a few colors. (You could think of that as a sort of compression where the goal is not to reduce file size, but to reduce the number of colors needed to comprehend the image.)
JPG, WebP etc. are compression techniques designed to reduce the size of a full color images, especially photos. Because they’re specifically designed for photos, they don’t work as well on things that aren’t “photo like.”
Dithered images are very much not like real photos, so it’s not surprising that compression techniques designed for photos don’t work well on dithered images.
(I’m not an expert on image compression, but as an example, I believe JPEG and similar algorithms expect to find large blocks of basically the same color in photos - such as a blue sky - and save space by simplifying that to a few big regions of all one color. The “speckled” appearance caused by dithering actively defeats that particular optimization.)
Re: Websites should not use dithered images
#13TLDR: There are much better compression algorithms than dithering
In the case of images, it makes color-reduced versions not look terrible.
Adding noise is almost always a bad thing for compression. The undithered images would compress much better.
Re: Websites should not use dithered images
#14That said just pulling out a good lossy encoder makes a lot more sense most of the time. It is easier and it will look better. Dithering is lossy anyway.
Re: Websites should not use dithered images
#15The idea that dithering should be used to reduce your image size is a misunderstanding of image compression. Dithering is a technique which allows you to represent a color image with a very limited palette, in particular a two bit palette. The result is not much like a normal photo, but much better than nothing if you have a machine that can only output a few colors. (You could think of that as a sort of compression…
Re: Websites should not use dithered images
#16Don't forget dithering your spacer.gif files! very important!
Re: Websites should not use dithered images
#17Curious if this is a commentary a propos a popular low-tech website we see around HN. I appreciate the dithering pattern, though I recognize it is not as efficient as, say, a compressed jpeg or a palette limited GIF.
Shouldn't dithered images also benefit from the limited palette?
rgb: 75kb
indexed: 35kb
So indexing does look like it could save a lot. I do wonder if it can still beat out say jpeg or webp though.
Re: Websites should not use dithered images
#18I will admit I'm surprised by the results. I assume there's not really a rendering perf hit from WebP vs jpg?
Also, the preposition that lowering the file-size, and therefore transfer time, is the most important factor in environmental impact is, I think, a little under-supported.
That being said, the original Low Tech Magazine article's perf claim is back up from the data, but they also use very low resolution images.
I'd be curious if dithering could be optimized to a particular algorithm. For example, jpeg's quantization is based on the assumption that images are mostly made of low frequency data and higher frequency can be removed without changing the quality of the over all image too much. With dithering, this is almost the exact opposite and all low frequency information is replaced with high frequency information, meaning it won't be nearly as effective.
Re: Websites should not use dithered images
#19I would also be concerned with how these things scale in terms of the display. For instance somebody might have a HiDPI or Retina screen or they might be zoomed in or out on a particular web page. Or for that matter maybe you want to scale the size of the image so it fills the screen horizontally or vertically. The scaling algorithm might maintain the the dither or it might smooth and blend it. Maybe it looks OK in t…
Not to mention the fact that dithering will look different depending on the display’s gamma calibration...
For some game series (say Hyperdimension Neptunia) fan art captures the essence of art in the game but for the big Nintendo games on the 3DS (say Fire Emblem Fates) fan art doesn't look like the game art at all because the game art is calibrated to the characteristics of the display in every way.
Re: Websites should not use dithered images
#20Don't forget dithering your spacer.gif files! very important!
This is what I think of when the dithering articles show up. Way back in the day, dithering and reducing the color palette made a difference, when you were talking images loading over a 28.8k modem. For many widgets, you could shave kilobytes off, when kilobytes really, really meant something.
my 2p