Typedefs | Functions | Variables

File Reading
[File WritingPGM/PPM Library]

Caller provides the stream to be read, and two callbacks. More...

Collaboration diagram for File Reading:

Typedefs

typedef bool(* pgmppm::notify_size_fn )(IN void *context, IN int width, IN int length, IN int max_val)
typedef void(* pgmppm::pgm_write_pixel_fn )(IN void *context, IN int x, IN int y, IN int height)

Functions

bool pgmppm::readPgm (IO std::istream &in, IN notify_size_fn notify, IN pgm_write_pixel_fn write_pixel, IN void *context)

Variables

int pgmppm::color_t::green
int pgmppm::color_t::blue

Detailed Description

Caller provides the stream to be read, and two callbacks.

The first callback (notify_size) lets the caller know the size of the image. The second callback (write_pixel) is called per pixel in the image.

Again, designed for reusability and safety, not speed.


Typedef Documentation

typedef bool(* pgmppm::notify_size_fn)(IN void *context, IN int width, IN int length, IN int max_val)

Definition at line 120 of file pgmppm.h.

typedef void(* pgmppm::pgm_write_pixel_fn)(IN void *context, IN int x, IN int y, IN int height)

Definition at line 125 of file pgmppm.h.


Function Documentation

bool pgmppm::readPgm ( IO std::istream &  in,
IN notify_size_fn  notify,
IN pgm_write_pixel_fn  write_pixel,
IN void *  context 
)

Variable Documentation

int pgmppm::color_t::green [inherited]

Definition at line 88 of file pgmppm.h.

int pgmppm::color_t::blue [inherited]

Definition at line 89 of file pgmppm.h.