To write a file, the caller specifies the dimensions and a callback. More...
Classes | |
struct | pgmppm::color_t |
Modules | |
File Reading | |
Caller provides the stream to be read, and two callbacks. | |
| |
typedef int(* | pgmppm::pgm_pixel_fn )(void *context, int x, int y) |
typedef color_t(* | pgmppm::ppm_pixel_fn )(void *context, int x, int y) |
void | pgmppm::writePgm (std::ostream &out,int width,int height,int max_gray,pgm_pixel_fn fn,void *context) |
write a pgm file to an output stream | |
void | pgmppm::writePpm (std::ostream &out, int width, int height, int max_color, ppm_pixel_fn fn, void *context) |
To write a file, the caller specifies the dimensions and a callback.
The file-writing routine will call back to retrieve per-pixel info.
These are designed to be safe and agnostic to image storage, not fast.
typedef int(* pgmppm::pgm_pixel_fn)(void *context,int x,int y) |
typedef color_t(* pgmppm::ppm_pixel_fn)(void *context,int x,int y) |
void pgmppm::writePgm | ( | std::ostream & | out, | |
int | width, | |||
int | height, | |||
int | max_gray, | |||
pgm_pixel_fn | fn, | |||
void * | context | |||
) |
write a pgm file to an output stream
void pgmppm::writePpm | ( | std::ostream & | out, | |
int | width, | |||
int | height, | |||
int | max_color, | |||
ppm_pixel_fn | fn, | |||
void * | context | |||
) |