ppm2rgba rgba2ppm rgbaadd rgbaaddB rgbaautocrop rgbadither rgbafade rgbamerge rgbamergeB rgbaquant rgbascale rgbascaleB rgbascaleF rgbasub rgbasubB rgbatrans
|
Command line:rgbaquant [input_file] colors [ split1 [ split2 ] ]rgbadither [input_file] colors [ split1 [ split2 ] ]
Usage:Rgbaquant and rgbadither reduce the number of colors used in a 32 bit RGBA image. They are intended to be as good as XV and ppmquant at large colormaps (256 colors or greater), but offermuch better performance for small colormaps (2 to 64 colors). Rgbaquant sets each pixel to the closest color in the resulting colormap and rgbadither dithers the image to reduce overall 'color' error.Rgbaquant and rgbadither can take input either from stdin or from a file specified on the command line. If a filename appears on the command line, stdin will not be checked for input. Filenames must appear before numeric arguments. The number of colors to appear in the new colormap is the only required argument. The second and third optional numeric arguments are intended to influence the heuristics used to choose the new colormap. Rgbaquant and rgbadither use three seperate algorithms in concert to choose a new colormap. The first two are based on IJG code and break an RGB colorcube space into smaller and smaller rectangular areas; the first algorithm breaks in half each area with the largest color population and the second breaks in half by area volume. The first 'split' argument assigns how many colors will be chosen by the first algorithm before the second takes over. The third algorithm used is the 'color diversity' algorithm developed by John Bradley and used (in a modified form) by XV. The idea here is to always choose the color from the original image farthest from each entry in the already chosen portion of the new colormap. The second 'split' argument specifies how many colors the IJG algorithms may choose before the third 'diversity' algorithm takes over. The split arguments are optional; rgbaquant and rgbadither will choose defaults that are appropriate for most images. Note that 'transparent' colors exist as if they were opaque as far as rgbaquant and rgbadither are concerned. Output is directed to stdout and errors to stderr.
Bugs:In the interest of simple command-line parsing, all arguments that begin with a digit, decimal point or unary minus are considered to be numeric arguments (not filenames). Therefore, the input file cannot begin with any of these else it would be mistakenly taken as the first numeric argument.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
These pages are copyright (C) 1994-1997
Xiphophorus. All rights reserved.
|