#include "pandabase.h"
#include <string>
Go to the source code of this file.
Compounds | |
struct | pixel |
Defines | |
#define | PGM_BIGGRAYS |
#define | PGM_MAXMAXVAL 65535 |
#define | PNM_MAXMAXVAL PGM_MAXMAXVAL |
#define | PPM_GETR(p) ((p).r) |
#define | PPM_GETG(p) ((p).g) |
#define | PPM_GETB(p) ((p).b) |
#define | PPM_PUTR(p, red) ((p).r = (red)) |
#define | PPM_PUTG(p, grn) ((p).g = (grn)) |
#define | PPM_PUTB(p, blu) ((p).b = (blu)) |
#define | PPM_ASSIGN(p, red, grn, blu) { (p).r = (red); (p).g = (grn); (p).b = (blu); } |
#define | PPM_EQUAL(p, q) ( (p).r == (q).r && (p).g == (q).g && (p).b == (q).b ) |
#define | PNM_ASSIGN1(x, v) PPM_ASSIGN(x,0,0,v) |
#define | PPM_DEPTH(newp, p, oldmaxval, newmaxval) |
Typedefs | |
typedef unsigned short | gray |
typedef gray | pixval |
typedef pixel | xel |
typedef gray | xelval |
Functions | |
EXPCL_PANDA void | pm_message (const char *format,...) |
Outputs the given printf-style message to the user and returns. | |
EXPCL_PANDA void | pm_error (const char *format,...) |
Outputs the given printf-style message to the user and terminates messily. | |
EXPCL_PANDA int | pm_maxvaltobits (int maxval) |
Returns the number of bits sufficient to hold the indicated maxval value. | |
EXPCL_PANDA int | pm_bitstomaxval (int bits) |
Returns the highest maxval that can be represented in the indicated number of bits. | |
EXPCL_PANDA char * | pm_allocrow (int cols, int size) |
Allocates a row of cols * size bytes. | |
EXPCL_PANDA void | pm_freerow (char *itrow) |
Frees the row previously allocated withm pm_allocrow(). | |
EXPCL_PANDA int | pm_readbigshort (istream *in, short *sP) |
EXPCL_PANDA int | pm_writebigshort (ostream *out, short s) |
EXPCL_PANDA int | pm_readbiglong (istream *in, long *lP) |
EXPCL_PANDA int | pm_writebiglong (ostream *out, long l) |
EXPCL_PANDA int | pm_readlittleshort (istream *in, short *sP) |
EXPCL_PANDA int | pm_writelittleshort (ostream *out, short s) |
EXPCL_PANDA int | pm_readlittlelong (istream *in, long *lP) |
EXPCL_PANDA int | pm_writelittlelong (ostream *out, long l) |
Variables | |
const double | lumin_red = 0.299 |
const double | lumin_grn = 0.587 |
const double | lumin_blu = 0.114 |
Definition in file pnmimage_base.h.
|
Definition at line 38 of file pnmimage_base.h. |
|
Definition at line 42 of file pnmimage_base.h. |
|
Definition at line 70 of file pnmimage_base.h. Referenced by PNMFileTypeJPG::Reader::read_data(), and PNMFileTypeJPG2000::Reader::read_data(). |
|
Definition at line 48 of file pnmimage_base.h. |
|
Definition at line 68 of file pnmimage_base.h. Referenced by PNMImage::add_alpha(), BMPreadrow(), PNMFileTypeJPG::Reader::read_data(), PNMFileTypeJPG2000::Reader::read_data(), and PNMImage::remove_alpha(). |
|
Value: PPM_ASSIGN( (newp), \ ( (int) PPM_GETR(p) * (newmaxval) + (oldmaxval) / 2 ) / (oldmaxval), \ ( (int) PPM_GETG(p) * (newmaxval) + (oldmaxval) / 2 ) / (oldmaxval), \ ( (int) PPM_GETB(p) * (newmaxval) + (oldmaxval) / 2 ) / (oldmaxval) ) Definition at line 72 of file pnmimage_base.h. |
|
Definition at line 69 of file pnmimage_base.h. Referenced by ppm_addtocolorhist(), ppm_colorhisttocolorhash(), ppm_computecolorhash(), and ppm_lookupcolor(). |
|
Definition at line 62 of file pnmimage_base.h. Referenced by BMPwriterow(), PNMImage::get_xel_val(), PNMImage::make_rgb(), ppm_colorhisttocolorhash(), PNMFileTypeSoftImage::Reader::read_row(), PNMFileTypeTIFF::Writer::Writer(), PNMFileTypeIMG::Writer::Writer(), and PNMFileTypeAlias::Writer::Writer(). |
|
Definition at line 61 of file pnmimage_base.h. Referenced by BMPwriterow(), ppm_colorhisttocolorhash(), PNMFileTypeTIFF::Writer::Writer(), and PNMFileTypeIMG::Writer::Writer(). |
|
Definition at line 60 of file pnmimage_base.h. Referenced by BMPwriterow(), PNMImage::make_grayscale(), ppm_colorhisttocolorhash(), PNMFileTypeTIFF::Writer::Writer(), and PNMFileTypeIMG::Writer::Writer(). |
|
Definition at line 66 of file pnmimage_base.h. Referenced by PNMImage::get_red_val(), and PNMImage::set_xel_val(). |
|
Definition at line 65 of file pnmimage_base.h. |
|
Definition at line 64 of file pnmimage_base.h. Referenced by PNMImage::set_xel_val(). |
|
Definition at line 41 of file pnmimage_base.h. Referenced by PNMImage::from_val(), PNMImage::get_red_val(), and PNMImage::remove_alpha(). |
|
Definition at line 54 of file pnmimage_base.h. Referenced by PNMFileTypeBMP::Writer::Writer(). |
|
Definition at line 55 of file pnmimage_base.h. |
|
|
Allocates a row of cols * size bytes.
Definition at line 135 of file pnmimage_base.cxx. References writer(). |
|
Returns the highest maxval that can be represented in the indicated number of bits.
Definition at line 123 of file pnmimage_base.cxx. |
|
Outputs the given printf-style message to the user and terminates messily. Minimize use of this function. Definition at line 71 of file pnmimage_base.cxx. Referenced by BMPEncode(), BMPEncode24(), BMPlenfileheader(), BMPleninfoheader(), BMPlenline(), BMPlenrgbtable(), BMPreadbits(), BMPreadinfoheader(), BMPwritebits(), BMPwriteinfoheader(), BMPwritergb(), colorstobpp(), GetByte(), GetLong(), GetShort(), ppm_alloccolorhash(), ppm_colorhashtocolorhist(), ppm_colorhisttocolorhash(), ppm_computecolorhash(), put_byte(), PutByte(), PutLong(), PutShort(), PNMFileTypeTGA::Reader::Reader(), and readto(). |
|
Frees the row previously allocated withm pm_allocrow().
Definition at line 147 of file pnmimage_base.cxx. Referenced by PNMFileTypeTGA::Reader::read_data(). |
|
Returns the number of bits sufficient to hold the indicated maxval value.
Definition at line 104 of file pnmimage_base.cxx. |
|
Outputs the given printf-style message to the user and returns.
Definition at line 40 of file pnmimage_base.cxx. Referenced by BMPreadinfoheader(). |
|
Definition at line 170 of file pnmimage_base.cxx. References reader(). |
|
Definition at line 156 of file pnmimage_base.cxx. References reader(). |
|
Definition at line 198 of file pnmimage_base.cxx. |
|
Definition at line 184 of file pnmimage_base.cxx. |
|
Definition at line 177 of file pnmimage_base.cxx. References writer(). Referenced by write_uchar_SI(). |
|
Definition at line 163 of file pnmimage_base.cxx. References writer(). Referenced by put_byte(). |
|
Definition at line 205 of file pnmimage_base.cxx. Referenced by PutLong(). |
|
Definition at line 191 of file pnmimage_base.cxx. Referenced by PutShort(). |
|
Definition at line 104 of file pnmimage_base.h. |
|
Definition at line 103 of file pnmimage_base.h. |
|
Definition at line 102 of file pnmimage_base.h. |