--- ray/src/px/ra_bmp.c 2004/09/23 18:00:54 2.9 +++ ray/src/px/ra_bmp.c 2011/05/20 02:06:39 2.11 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ra_bmp.c,v 2.9 2004/09/23 18:00:54 greg Exp $"; +static const char RCSid[] = "$Id: ra_bmp.c,v 2.11 2011/05/20 02:06:39 greg Exp $"; #endif /* * program to convert between RADIANCE and Windows BMP file @@ -160,8 +160,10 @@ main(int argc, char *argv[]) if (rgbp == NULL) { hdr = BMPmappedHeader(scanlen(&rs), numscans(&rs), 0, 256); + /* if (outfile != NULL) hdr->compr = BI_RLE8; + */ } else hdr = BMPtruecolorHeader(scanlen(&rs), numscans(&rs), 0); @@ -350,7 +352,7 @@ tmap2bmp(char *fnin, char *fnout, char *expec, RGBPRIM BMPWriter *wtr; FILE *fp; int xr, yr; - BYTE *pa; + uby8 *pa; int i; /* check tone-mapping spec */ i = strlen(expec); @@ -395,7 +397,7 @@ tmap2bmp(char *fnin, char *fnout, char *expec, RGBPRIM quiterr("cannot allocate writer structure"); /* write to BMP file */ while (wtr->yscan < yr) { - BYTE *scn = pa + xr*((tmflags & TM_F_BW) ? 1 : 3)* + uby8 *scn = pa + xr*((tmflags & TM_F_BW) ? 1 : 3)* (yr-1 - wtr->yscan); if (tmflags & TM_F_BW) memcpy((void *)wtr->scanline, (void *)scn, xr);