138 |
|
|
139 |
|
/* open input file */ |
140 |
|
#define BMPopenInputFile(fn) BMPopenReader(&stdio_getc, &stdio_fseek, \ |
141 |
< |
(void *)fopen(fn, "r")) |
141 |
> |
(void *)fopen(fn, "rb")) |
142 |
|
|
143 |
|
/* close stdio input file or stream */ |
144 |
|
#define BMPcloseInput(br) ( fclose((FILE *)(br)->c_data), \ |
151 |
|
/* open stdio output file */ |
152 |
|
#define BMPopenOutputFile(fn,hdr) \ |
153 |
|
BMPopenWriter(&stdio_putc, &stdio_fseek, \ |
154 |
< |
(void *)fopen(fn, "w"), hdr) |
154 |
> |
(void *)fopen(fn, "wb"), hdr) |
155 |
|
|
156 |
|
/* close stdio output file or stream */ |
157 |
|
#define BMPcloseOutput(bw) ( fclose((FILE *)(bw)->c_data), \ |