--- ray/src/common/bmpfile.h 2005/03/18 21:04:05 2.4 +++ ray/src/common/bmpfile.h 2008/05/31 19:38:36 2.6 @@ -1,4 +1,4 @@ -/* RCSid $Id: bmpfile.h,v 2.4 2005/03/18 21:04:05 greg Exp $ */ +/* RCSid $Id: bmpfile.h,v 2.6 2008/05/31 19:38:36 greg Exp $ */ /* * Windows and OS/2 BMP file support */ @@ -6,7 +6,7 @@ #ifndef _RAD_BMPFILE_H_ #define _RAD_BMPFILE_H_ -#include "tifftypes.h" +#include "tiff.h" /* needed for int32, etc. */ #ifdef __cplusplus extern "C" { @@ -138,7 +138,7 @@ int stdio_fseek(uint32 pos, void *p); /* open input file */ #define BMPopenInputFile(fn) BMPopenReader(&stdio_getc, &stdio_fseek, \ - (void *)fopen(fn, "r")) + (void *)fopen(fn, "rb")) /* close stdio input file or stream */ #define BMPcloseInput(br) ( fclose((FILE *)(br)->c_data), \ @@ -151,7 +151,7 @@ int stdio_fseek(uint32 pos, void *p); /* open stdio output file */ #define BMPopenOutputFile(fn,hdr) \ BMPopenWriter(&stdio_putc, &stdio_fseek, \ - (void *)fopen(fn, "w"), hdr) + (void *)fopen(fn, "wb"), hdr) /* close stdio output file or stream */ #define BMPcloseOutput(bw) ( fclose((FILE *)(bw)->c_data), \