10 ostream&
printpgm(ostream& os,
int xsize,
int ysize,
const double *
const * matrix){
13 os<<
"P5" << endl << xsize << endl << ysize << endl << 255 << endl;
14 for (
int y=ysize-1; y>=0; y--){
15 for (
int x=0;x<xsize; x++){
16 unsigned char c=(
unsigned char)(255*fabs(1.-matrix[x][y]));
ostream & printpgm(ostream &os, int xsize, int ysize, const double *const *matrix)