Why would anyone even consider color dithering these days when it comes to the Web? It feels counterproductive even intuitively.
Websites should not use dithered images
121–130 of 133 posts
Re: Websites should not use dithered images
#122Earlier quoted context omitted.
Doing this makes a lot of sense for any web setup where you already have something you're calling an "asset pipeline", but can seem pretty nuts where you're writing simple no-JS HTML.
It's really not bad: and you only need to bother with this on images it might matter (e.g. key large multi MB photos in a blog post or something not all of the 20x20 logo icons that would be less than 2kb even if uncompressed).
Re: Websites should not use dithered images
#123Earlier quoted context omitted.
Doing this makes a lot of sense for any web setup where you already have something you're calling an "asset pipeline", but can seem pretty nuts where you're writing simple no-JS HTML.
nothing about web for the last decade has been about no-JS HTML its an option but doesn't leave you anything to contribute. the web is fragmented most of the toolchain is for simplifying deployment into that fragmented place without caring that it is fragmented. so not really nuts when everything already takes care of it for you. you can stick with no-JS HTML cached on an edge node just as well, or not cached if you…
Re: Websites should not use dithered images
#124Re: Websites should not use dithered images
#125Earlier quoted context omitted.
It's really not bad: and you only need to bother with this on images it might matter (e.g. key large multi MB photos in a blog post or something not all of the 20x20 logo icons that would be less than 2kb even if uncompressed).
The HTML isn't bad, sure, but the process of generating appropriately scaled and formatted copies of images can be if you don't have other build steps that require similar automation.
Unless rescaling an image itself is already too much work, in which case this has nothing to do with image formats or plain HTML sites in the first place.
Re: Websites should not use dithered images
#126Re: Websites should not use dithered images
#127TLDR: There are much better compression algorithms than dithering
Dithering isn't a compression algorithm[1]. It's an algorithm that adds noise to effectively increase bitdepth when downsampling. 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. [1]: https://en.wikipedia.org/wiki/Dither
Re: Websites should not use dithered images
#128Earlier quoted context omitted.
Compressing, perhaps. But decompressing? Not really.
Floyd-steinberg dithering is at least an order of magnitude cheaper than JPEG decompression
Re: Websites should not use dithered images
#129Curious 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.
If you read the article, it is very clear and direct about being a commentary on Low Tech Magazine
Re: Websites should not use dithered images
#130The 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…
> Dithering is a technique which allows you to represent a color image with a very limited palette, in particular a two bit palette. To be way more pedantic, dithering is a technique to reduce the quantization error (what happens when you map values from a big, possibly infinite set to a smaller, finite set). This is done whenever a system or algorithm converts data from higher dynamic range representation (more bits…
You are mixing two things here? Bit depth reduction is a specific term, it refers to the reduction in the amount of information you want to _convey_.
Compression is be reducing the number of bits/pixel averaged across the whole image. Good compression algorithms will not be spatially uniform, it's entirely possible that pixels in some parts of the image are compressed with more bits/pixel than pixels in other parts.