--- ray/src/px/normtiff.c 2006/09/26 12:26:02 3.10 +++ ray/src/px/normtiff.c 2010/12/04 00:24:43 3.12 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: normtiff.c,v 3.10 2006/09/26 12:26:02 greg Exp $"; +static const char RCSid[] = "$Id: normtiff.c,v 3.12 2010/12/04 00:24:43 greg Exp $"; #endif /* * Tone map SGILOG TIFF or Radiance picture and output 24-bit RGB TIFF @@ -10,6 +10,7 @@ static const char RCSid[] = "$Id: normtiff.c,v 3.10 20 #include #include +#include "platform.h" #include "tiffio.h" #include "color.h" #include "tonemap.h" @@ -137,7 +138,7 @@ main( exit(rval==0 ? 0 : 1); userr: fprintf(stderr, -"Usage: %s [-h][-s][-c][-l][-b][-g gv][-d ld][-u lm][-z][-p xr yr xg yg xb yb xw yw] input.{tif|pic} output.tif\n", +"Usage: %s [-h][-s][-c][-l][-b][-g gv][-d ld][-u lm][-z][-p xr yr xg yg xb yb xw yw] input.{tif|hdr} output.tif\n", argv[0]); exit(1); } @@ -184,6 +185,7 @@ openpicture( /* open/check Radiance picture file */ /* else try opening it */ if ((fp = fopen(fname, "r")) == NULL) return(NULL); + SET_FILE_BINARY(fp); /* allocate struct */ if ((pp = (PICTURE *)malloc(sizeof(PICTURE))) == NULL) return(NULL); /* serious error -- should exit? */