Caller provides the stream to be read, and two callbacks. More...
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 |
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 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) |
bool pgmppm::readPgm | ( | IO std::istream & | in, | |
IN notify_size_fn | notify, | |||
IN pgm_write_pixel_fn | write_pixel, | |||
IN void * | context | |||
) |
int pgmppm::color_t::green [inherited] |
int pgmppm::color_t::blue [inherited] |