Quantize

Purpose

To convert image format files to Quantize format, or vice-versa.

Overview

Quantize reduces the number of colors used in an image for display on reduced palette displays. The quantizer can either create the reduced colormap, or quantize to an existing colormap.

How to Use

  1. Select Filter Quantize from the Render menu. The Alias File Requestor is displayed.

  2. Click the Show List button to display the File Lister.

  3. In the File Lister, click on the filename, or double-click on the file's icon. If you prefer, you can also type a name and/or a path from scratch without selecting anything in the File Lister. The filename and its UNIX path appear in the File Requestor.

  4. Click the Pix file button. The File Requestor takes the selected file and uses it for the Pix file.

Quantize Options

Select Quantize- to display the Quantize Options window.

Frame Options

Application

The Application option controls the number of files converted. Click to the right of the heading to display the Applications menu.

SINGLE to convert just one file (the default). SINGLE takes a single image file as input and quantizes it.
SEQUENCE to convert an animation. SEQUENCE takes a series of image files as input. If a colormap is being generated (for example, if the Input field of the Colormap options is empty), the quantizer reads in all specified images of the animation before creating the colormap. This enables a colormap to be generated for a sequence of frames whose dominant colors may change over time.

Tip: Quantizing is a memory-intensive operation. If a colormap is being generated, then specifying too many files when filenames are requested may cause the quantizer to run out of memory.

If you select SEQUENCE, the following sliders are displayed.

Start/End/By

Start the number of the first frame to be quantized.
End the number of the last frame to be quantized.
By the amount by which frame numbers are increased each time. Tip: By is usually set to 1, however larger values are useful for creating colormaps that represent an entire animation.

Extension size

This controls the number of padded 0's on the frame extension. For example, an extension size of 3 produces the file "<filename>.001" for frame 1, while an extension size of 1 produces the file "<filename>.1".

Quantization Options

Dither

During the quantization, a dither can be applied to the quantized image. Dithering examines the difference (error) between the real color and the color to which it is quantized, then distributes the difference to the surrounding pixels, which have not yet been quantized.

Two types of dither are available, both based on the Floyd/Steinberg dithering algorithm. Click to the right of the heading to display the Dither menu. The default is None.

Floyd/Steinberg the standard Floyd/Steinberg dither distributes 3/8ths of the error to the pixel on the right and the pixel below, and 2/8ths to the pixel on the bottom right.
Modified F/S the modified Floyd/Steinberg dither distributes 7/16ths of the error to the right, 5/16ths to the pixel below, 3/16ths to the pixel down and to the left, and 1/16th to the pixel down and to the right.

Average Deviation

The default quantization uses the number of pixels in a certain color range to split colors when creating the color lookup table. If this method (called the median cut) does not produce acceptable results, then turn this button ON to change the behavior so that color ranges are split using the average deviation rather than a popularity count. The default is OFF.

Bit Depth

This specifies the number of colors to be used in the quantization of the image file. The default value of 8 bits means that the images are quantized so that they use only 256 colors.

Colormap Options

Input

If you provide a colormap filename for the Input field, all input files are quantized using that colormap. The input file is used to create the colormap before quantizing begins. See the Alias Stand-alone Utilities Guide for more information on the stand-alone aquant.

If this field is specified, the quantizer expects that the given file contains a plain text color table. The format of this plain text color table is straightforward. The first line is "cmap colors #" where # is the number of colors in this colormap, and the remaining # lines are triple color values (Red Green Blue) in the integer range 0 to 255.

You can produce an example of a colormap file by creating an Output color table by entering an output file name, quantizing an image, and editing the Output file.

Click the Browse button to open the File Lister from which you can select a file.

Output

If this field is specified, the quantizer writes the colormap it generates to this file as plain text. See Input (above) for information about the format of this file.

Click the Browse button to open the File Lister from which you can select a file.

Other Options

Store TIFF

If set to ON, the output file will be in TIFF colormap image format.

Note: Only 8 bits/pixel TIFF files can be generated.

Black elimination

Click to the right of the heading to display the Black elimination menu.

Input black pixels are ignored when creating the colormap.
Output all black pixels (0, 0, 0) are quantized to (0, 0, 1) on output. Setting Black elimination to Input and Output performs both operations.

Verbose

Normally the quantizer provides no feedback. Turning verbose ON causes diagnostics to be written into the errlog.

Quantize Options Window Buttons

Click the Go button at the bottom of the window to invoke the Quantize operation, or Save to save the options you set, and you are prompted for filenames.

Entering Filenames

The filenames you enter are used as a prefix for input and output files. For example, if From is set to 1, To is set to 20, By is set to 1, and the input filename prefix myfile is entered, the actual files used are myfile.1 through myfile.20. If the output filename prefix newfile is entered, the actual files created are newfile.1 to newfile.20.





aliasdocs@aw.sgi.com
Copyright © 1997, Alias|Wavefront, a Silicon Graphics Company. All rights reserved.