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