Operators Dialog / Operator Details

§ 12.11.16 - Color Reduction

Scripting command: creduce [Depth=3...7] [Dither=0...1] [Dithtype=0...2] [Save=0...1] [Fixed=0...1] [Force=0...1]

Note: All available scripting operations are listed on the Script operator page.

This operator can reduce a full-color image to a 256 (or fewer) color image suitable for saving as GIF image. It also creates palettes, and you can save those in JSON format.


The color reduction operator

 Depth    tells the system how deeply the image is to be processed to generate a palette. The more bits involved, the more memory it takes, and the longer the reduction will take to generate.  5:5:5    is the default setting, which works well for most images.

Note:

 Depth    is not the number of bits in the resulting render; all renders are 8 bits which may have up to 256 8-bit (for GIF saves) or 16-bit (for images still open) colors in the end result. It is only a setting that adjusts how the reduction technology in iToolBox works.

 Dither    allows you to choose from several different dither methods.  Ordered    is the default.

 Use Dither tells the operator whether to use dithering in the rendered result or not.

 Save GIF after Render will open a file dialog and allow you to save a GIF image after the reduction has been finished.

 Fixed Palette This selects a standard. preset palette of 256 colors to use for the render. This, combined with ordered dither, results in the least change in similar images; however, the preset colors are unlikely to be very good choices — choosing a fixed palette a compromise that for single, still images, should probably not be made.

 Force B, G, W tells the operator that when it is creating a custom palette, to make sure that there are palette entries for black, grey and white. Always having these colors available can be useful if the image will have text or other items rendered into it in use by another application.

Save Image Palette Once an image has been reduced, the resulting palette is attached to the image as long as it remains loaded, or until you reduce it again. Once an image has a palette, you can save it in JSON format using this button.

Colors: This indicates how many colors are present in the action image.

Compute Load: This tells you how much memory will be consumed by custom palette generation. Changing  Depth    will change this metric.

Palette: This lets you know if the action image has a palette, and if so, if it is a fixed palette or one that was custom created for it.

§ 12.11.16.1 - Examples

Images with brilliant colors tend to do well with or without dither:


Original image
(24-bit PNG image)

 


Custom palette, ordered dither
(8-bit GIF image)

Fixed palette, ordered dither
(8-bit GIF image)

 


Custom palette, no dither
(8-bit GIF image)

Fixed palette, no dither
(8-bit GIF image)

 

Images with regions of slight tone changes such as skin tone almost have to be rendered with dither, unless you see the resulting bands of tone as a desirable artistic goal:


Original image
(24-bit PNG image)

 


Custom palette, ordered dither
(8-bit GIF image)

Fixed palette, ordered dither
(8-bit GIF image)

 


Custom palette, no dither
(8-bit GIF image)

Fixed palette, no dither
(8-bit GIF image)

Tip: One interesting — and perhaps initially confusing — thing is what can happen to a 256-grey level image when you scale it to a new size; the new grey levels are 16-bit interpolations of the original 256 levels, and so there can now be 16,384 grey levels instead of just 256. Consequently, when you see the color count in this operator, you won't see the original 256 grey level count, but instead, a larger number.
Document Keyboard Navigation
, Previous Page . Next Page
t TOC i Index k Keyboard o Operators g Glossary c Changes

Valid HTML 4.01 Loose
 

This manual was generated with wtfm
wtfm uses aa_macro and SqLite
wtfm and aa_macro are coded in python 2.7
iToolBox 3.11
This Documentation and Associated Application Executables are Public Domain
Please consider supporting my iToolBox development efforts with a small PayPal donation.