• Please use real names.

    Greetings to all who have registered to OPF and those guests taking a look around. Please use real names. Registrations with fictitious names will not be processed. REAL NAMES ONLY will be processed

    Firstname Lastname

    Register

    We are a courteous and supportive community. No need to hide behind an alia. If you have a genuine need for privacy/secrecy then let me know!
  • Welcome to the new site. Here's a thread about the update where you can post your feedback, ask questions or spot those nasty bugs!

Dithered gradients and file size

Doug Kerr

Well-known member
My usual image editor and "painting" program, Picture Publisher 10, offers a flexible facility for creating gradients of various types to use, for example, as backgrounds.

It includes the option to dither the gradient. The object is to obscure banding that might be observed in the gradient.

But in most cases, this feature is counter-productive. Even assuming an 8-bit sRGB working space, the luminance increments are so small that is it difficult to perceive the banding, regardless of the band spacing. And the dither is not really any more handsome (although, of course, its effects are not usually visible either).

In PP10, even though the gradient may occur only, for example, in the horizontal direction, the dither is randomly applied in both axes; it is not really way a to "fake" a smooth luminance change along the gradient axis with chromaticity tampering, but rather to obscure the banding with "noise". Maybe other applications are more suave.

But a gigantic impact of the inclusion of a dithered area (background, perhaps) in a composed image is on the file size. The randomness of the pixel colors greatly frustrates the various compression schemes, leading to some astounding file sizes.

To give some idea of this, I ran some tests with an 1800 x 1800 px image consisting only of a gray gradient running from 0,0,0 at one edge to 255,255,255 at the other edge. The work space was 8-bit sRGB. The gradient was applied both dithered and non-dithered.

The table below shows the resulting image saved in different file formats.

PP10_gradient_file_sizes_01.gif


Note that the "ppf" filetype is PP10's proprietary native format, which preserves objects and so forth for future editing.

The message is of course not to apply dithering to gradient backgrounds by accident (perhaps via the factory defaults).

In sure that the story may be much different with Photoshop or BelarusPicFix.
 
Top