Dithering

Dithering header

Before computers were even a widespread product, dithering was used in World War 2 to create accurate maps. Today, it’s become an image processing effect that’s fallen to the wayside. However, it’s not entirely useless.

What Is Dithering?

Dithering creates the illusion of color depth in images with a limited color palette. Essentially, it reduces the banding of colors and shades in an image. However, depending on the file format, dithering also affects the file size.

How Does Dithering Work?

It works by mixing pixels from two or more neighboring colors, approximating the desired color. For example, if you wanted to draw a bright red circle on top of a yellow background but only had access to three shades of red and two shades each for yellow and black, then using dithering would allow you to create many more than four different colors.

The simplest form of dithering is error diffusion: when you print an image with pixels having only two possible values (black or white), the printer will print in shades of gray between those two extremes. If you have an image with four distinct colors – say red, green, blue, and yellow – then each pixel can be printed using one of these four colors depending on how dark or light its value is; this process gives us what we call “full color.”

However, there are some problems with printing full-color images this way:

  • It takes longer for your computer screen to convert them into something your machine can understand
  • Some people find it more challenging than others to determine whether their monitor has displayed the correct shade, leading to inaccessibility
  • Even though modern monitors include settings that give users control over brightness, contrast, etc., these changes aren’t applied consistently across different brands/models, so results may vary

Dithering

Save Storage Space and Improve Efficiency with Cloudinary Instead

While you could rely on complicated compression algorithms and dithering to increase performance on your site, it’s not a practical solution. Instead, you should rely on a tool to manage and optimize your media.

With Cloudinary’s media optimization, we automatically compress images using the optimal encoder for the task. You won’t need to worry about sacrificing image quality for performance – Cloudinary takes care of it with our Media Experience Cloud.

If you want to get a headstart on optimizing your media, try Cloudinary today. You can sign up for free today!

Last updated: May 25, 2023