Utah Raster Toolkit
9999-git
URT Development version (post-3.1b)
Main Page
Data Structures
Files
File List
Globals
include
colorquant.h
Go to the documentation of this file.
1
/*
2
* This software is copyrighted as noted below. It may be freely copied,
3
* modified, and redistributed, provided that the copyright notice is
4
* preserved on all copies.
5
*
6
* There is no warranty or other guarantee of fitness for this software,
7
* it is provided solely "as is". Bug reports or fixes may be sent
8
* to the author, who may or may not act on them as he desires.
9
*
10
* You may not include this software in a program or other software product
11
* without supplying the source, or without informing the end-user that the
12
* source is available for no extra charge.
13
*
14
* If you modify this software, you should include a notice giving the
15
* name of the person performing the modification, the date of modification,
16
* and the reason for such modification.
17
*/
18
/*
19
* colorquant.h - Definitions for colorquant.
20
*
21
* Author: Spencer W. Thomas
22
* EECS Dept.
23
* University of Michigan
24
* Date: Thu Jan 3 1991
25
* Copyright (c) 1991, University of Michigan
26
*/
27
28
29
/* Define values for the accum_hist argument:
30
*
31
* If non-zero the histogram will accumulate and reflect pixels from
32
* multiple images. When 1, the histogram will be initialized and
33
* summed, but not thrown away OR processed. When 2, the image RGB will
34
* be added to it. When 3, Boxes are cut and a colormap and rgbmap are
35
* be returned, Histogram is freed too. When zero, all code is
36
* executed as per normal.
37
*/
38
#
define
INIT_HIST
1
39
#
define
USE_HIST
2
40
#
define
PROCESS_HIST
3
41
42
/*
43
* Flag bits.
44
*
45
* CQ_FAST: If set, the rgbmap will be constructed quickly. If
46
* not set, the rgbmap will be built much slower, but
47
* more accurately. In most cases, CQ_FAST should be
48
* set, as the error introduced by the approximation is
49
* usually small.
50
* CQ_QUANTIZE: If set, the data in red, green, and blue is not
51
* pre-quantized, and will be quantized "on the fly".
52
* This slows the routine slightly. If not set, the data
53
* has been prequantized to 'bits' significant bits.
54
* CQ_NO_RGBMAP:If set, rgbmap will not be built.
55
*
56
*/
57
#
define
CQ_FAST
1
58
#
define
CQ_QUANTIZE
2
59
#
define
CQ_NO_RGBMAP
4
60
61
/* Declare the function. */
62
#
ifdef
USE_PROTOTYPES
63
extern
int
colorquant
(
unsigned
char
*red,
64
unsigned
char
*green,
65
unsigned
char
*blue,
66
unsigned
long
pixels,
67
unsigned
char
*colormap[3],
68
int
colors,
69
int
bits,
70
unsigned
char
*rgbmap,
71
int
flags,
72
int
accum_hist );
73
#
else
74
extern
int
colorquant();
75
#
endif
USE_PROTOTYPES
#define USE_PROTOTYPES
Definition:
rle_config.h:22
colorquant
int colorquant(unsigned char *red, unsigned char *green, unsigned char *blue, unsigned long pixels, colormap, int colors, int bits, unsigned char *rgbmap, int flags, int accum_hist)
Definition:
colorquant.c:242
Generated on Thu Sep 24 2015 11:47:03 for Utah Raster Toolkit by
1.8.10