#include <palutil.h>
Class Description
- See also:
- Structure BMM_Color_64,
Structure BMM_Color_48,
Structure BMM_Color_24.
- Description:
- Color quantizer, for
doing true-color to paletted conversion. All methods of this class
are implemented by the system. Create a Quantizer object by calling:
Quantizer
*BMMNewQuantizer();
Be sure to call Quantizer::DeleteThis()
when done.
Constructor & Destructor Documentation
Member Function Documentation
virtual int AllocHistogram |
( |
void |
|
) |
[pure virtual] |
- Returns:
- Nonzero if the histogram was allocated; otherwise zero.
- Parameters:
- BMM_Color_48
*pal
Storage for the palette to compute.
int palsize
The size of the palette.
BMM_Color_64
*forceCol
If there is a color that you want to make sure is available in the
palette, you may pass it here. This is used for the background
color of an image for example. If this is not NULL the quantizer
will make up a palette and make sure that this color is in it. For
backgrounds, this looks much nicer because the background won't be
dithered when shown using the palette.
- Returns:
- Nonzero if the palette was computed; otherwise zero.
virtual void AddToHistogram |
( |
BMM_Color_64 * |
image, |
|
|
int |
npix |
|
) |
|
[pure virtual] |
- Parameters:
- BMM_Color_64
*image
The pixels to include.
int npix
The number of pixels above.
virtual void AddToHistogram |
( |
BMM_Color_48 * |
image, |
|
|
int |
npix |
|
) |
|
[pure virtual] |
- Parameters:
- BMM_Color_48
*image
The pixels to include.
int npix
The number of pixels above.
virtual void AddToHistogram |
( |
BMM_Color_24 * |
image, |
|
|
int |
npix |
|
) |
|
[pure virtual] |
- Parameters:
- BMM_Color_24
*image
The pixels to include.
int npix
The number of pixels above.
virtual void DeleteThis |
( |
|
) |
[pure virtual] |