kviewshell
DjVuPalette.h File Reference
#include "GContainer.h"
#include "GPixmap.h"
#include <string.h>
Go to the source code of this file.
Classes | |
class | DjVuPalette |
Defines | |
DjVuPalette.h | |
Files #"DjVuPalette.h"# and #"DjVuPalette.cpp"# implement a single class {DjVuPalette} which provides facilities for computing optimal color palettes, coding color palettes, and coding sequences of color indices. DjVuPalette header file
| |
#define | CALLINGCONVENTION |
Define Documentation
#define CALLINGCONVENTION |
Computing and coding color palettes and index arrays.
This class provides facilities for computing optimal color palettes, coding color palettes, and coding sequences of color indices.
{ Creating a color palette} -- The recipe for creating a color palette consists in (a) creating a DjVuPalette object, (b) constructing a color histogram using {histogram_add}, and (c) calling function {compute_palette}.
{ Accessing the color palette} -- Conversion between colors and color palette indices is easily achieved with {color_to_index} and {index_to_color}. There are also functions for computing a palette and quantizing a complete pixmap.
{ Sequences of color indices} -- The DjVuPalette object also contains an array {colordata} optionally containing a sequence of color indices. This array will be encoded and decoded by functions {encode} and {decode}. This feature simplifies the implementation of the ``one color per symbol'' model in DjVu.
{ Coding color palettes and color indices} -- Two functions {encode} and {decode} are provided for coding the color palette and the array of color indices when appropriate.
Definition at line 119 of file DjVuPalette.h.