Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ppmcmap.h File Reference

#include "pandabase.h"
#include "pnmimage_base.h"

Go to the source code of this file.

Compounds

struct  colorhist_item
struct  colorhist_list_item

Typedefs

typedef colorhist_itemcolorhist_vector
typedef colorhist_list_itemcolorhist_list
typedef colorhist_listcolorhash_table

Functions

EXPCL_PANDA colorhist_vector ppm_computecolorhist (pixel **pixels, int cols, int rows, int maxcolors, int *colorsP)
void ppm_addtocolorhist (colorhist_vector chv, int *colorsP, int maxcolors, pixel *colorP, int value, int position)
EXPCL_PANDA void ppm_freecolorhist (colorhist_vector chv)
colorhash_table ppm_computecolorhash (pixel **pixels, int cols, int rows, int maxcolors, int *colorsP)
EXPCL_PANDA int ppm_lookupcolor (colorhash_table cht, pixel *colorP)
colorhist_vector ppm_colorhashtocolorhist (colorhash_table cht, int maxcolors)
EXPCL_PANDA colorhash_table ppm_colorhisttocolorhash (colorhist_vector chv, int colors)
int ppm_addtocolorhash (colorhash_table cht, pixel *colorP, int value)
colorhash_table ppm_alloccolorhash (void)
void ppm_freecolorhash (colorhash_table cht)


Typedef Documentation

typedef colorhist_list* colorhash_table
 

Definition at line 36 of file ppmcmap.h.

Referenced by BMPEncode24(), ppm_alloccolorhash(), ppm_colorhisttocolorhash(), ppm_computecolorhash(), ppm_computecolorhist(), PNMFileTypeTIFF::Writer::write_data(), and PNMFileTypeBMP::Writer::write_data().

typedef struct colorhist_list_item* colorhist_list
 

Definition at line 19 of file ppmcmap.h.

typedef struct colorhist_item* colorhist_vector
 

Definition at line 12 of file ppmcmap.h.


Function Documentation

int ppm_addtocolorhash colorhash_table  cht,
pixel colorP,
int  value
 

Definition at line 140 of file ppmcmap.cxx.

References colorhist_list_item::ch, colorhist_item::color, colorhist_list_item::next, ppm_hashpixel, and colorhist_item::value.

void ppm_addtocolorhist colorhist_vector  chv,
int *  colorsP,
int  maxcolors,
pixel colorP,
int  value,
int  position
 

Definition at line 42 of file ppmcmap.cxx.

References colorhist_item::color, PPM_EQUAL, and colorhist_item::value.

colorhash_table ppm_alloccolorhash void   ) 
 

Definition at line 124 of file ppmcmap.cxx.

References colorhash_table, HASH_SIZE, and pm_error().

Referenced by ppm_colorhisttocolorhash(), and ppm_computecolorhash().

colorhist_vector ppm_colorhashtocolorhist colorhash_table  cht,
int  maxcolors
 

Definition at line 159 of file ppmcmap.cxx.

References colorhist_list_item::ch, HASH_SIZE, colorhist_list_item::next, and pm_error().

Referenced by ppm_computecolorhist().

EXPCL_PANDA colorhash_table ppm_colorhisttocolorhash colorhist_vector  chv,
int  colors
 

Definition at line 187 of file ppmcmap.cxx.

References colorhist_list_item::ch, colorhist_item::color, colorhash_table, colorhist_list_item::next, pm_error(), ppm_alloccolorhash(), PPM_EQUAL, PPM_GETB, PPM_GETG, PPM_GETR, ppm_hashpixel, and colorhist_item::value.

Referenced by PNMFileTypeTIFF::Writer::write_data(), PNMFileTypeTGA::Writer::write_data(), and PNMFileTypeBMP::Writer::write_data().

colorhash_table ppm_computecolorhash pixel **  pixels,
int  cols,
int  rows,
int  maxcolors,
int *  colorsP
 

Definition at line 81 of file ppmcmap.cxx.

References colorhist_list_item::ch, colorhist_item::color, colorhash_table, colorhist_list_item::next, pixels, pm_error(), ppm_alloccolorhash(), PPM_EQUAL, ppm_freecolorhash(), ppm_hashpixel, row, and colorhist_item::value.

Referenced by ppm_computecolorhist().

EXPCL_PANDA colorhist_vector ppm_computecolorhist pixel **  pixels,
int  cols,
int  rows,
int  maxcolors,
int *  colorsP
 

Definition at line 26 of file ppmcmap.cxx.

References colorhash_table, pixels, ppm_colorhashtocolorhist(), ppm_computecolorhash(), and ppm_freecolorhash().

Referenced by PNMFileTypeTIFF::Writer::write_data(), PNMFileTypeTGA::Writer::write_data(), and PNMFileTypeBMP::Writer::write_data().

void ppm_freecolorhash colorhash_table  cht  ) 
 

Definition at line 240 of file ppmcmap.cxx.

References HASH_SIZE, and colorhist_list_item::next.

Referenced by ppm_computecolorhash(), ppm_computecolorhist(), and PNMFileTypeTGA::Writer::~Writer().

EXPCL_PANDA void ppm_freecolorhist colorhist_vector  chv  ) 
 

Definition at line 234 of file ppmcmap.cxx.

Referenced by PNMFileTypeTIFF::Writer::write_data(), PNMFileTypeBMP::Writer::write_data(), and PNMFileTypeTGA::Writer::~Writer().

EXPCL_PANDA int ppm_lookupcolor colorhash_table  cht,
pixel colorP
 

Definition at line 219 of file ppmcmap.cxx.

References colorhist_list_item::ch, colorhist_item::color, colorhist_list_item::next, PPM_EQUAL, ppm_hashpixel, and colorhist_item::value.

Referenced by BMPwriterow(), PNMFileTypeTGA::Writer::put_map(), and PNMFileTypeTIFF::Writer::write_data().


Generated on Fri Apr 18 00:11:00 2003 for Panda by doxygen1.3