Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #pragma once
00012 #include "maxheap.h"
00013 #include <WTypes.h>
00014
00015
00016 struct BMM_Color_24;
00017 struct BMM_Color_48;
00018 struct BMM_Color_64;
00019
00020
00021
00022
00023
00031 class ColorPacker: public MaxHeapOperators {
00032 public:
00034 virtual ~ColorPacker() {}
00040 virtual void EnableDither(BOOL onoff)=0;
00048 virtual void PropogateErrorBetweenLines(BOOL onoff)=0;
00058 virtual void PackLine( BMM_Color_64* in, BYTE *out, int w)=0;
00068 virtual void PackLine( BMM_Color_48* in, BYTE *out, int w)=0;
00071 virtual void DeleteThis()=0;
00072 };
00073
00074
00100 UtilExport ColorPacker *NewColorPacker(
00101 int w,
00102 BMM_Color_48 *pal,
00103 int npal,
00104 BYTE* remap=NULL,
00105 BOOL dither = FALSE
00106 );
00107
00108
00109
00110
00118 class Quantizer: public MaxHeapOperators {
00119 public:
00121 virtual ~Quantizer() {}
00125 virtual int AllocHistogram(void)=0;
00140 virtual int Partition(BMM_Color_48 *pal, int palsize, BMM_Color_64 *forceCol)=0;
00148 virtual void AddToHistogram(BMM_Color_64 *image, int npix)=0;
00156 virtual void AddToHistogram(BMM_Color_48 *image, int npix)=0;
00164 virtual void AddToHistogram(BMM_Color_24 *image, int npix)=0;
00167 virtual void DeleteThis()=0;
00168 };
00169
00170 UtilExport Quantizer *NewQuantizer();
00171