fix fax2tiff
see http://bugzilla.maptools.org/show_bug.cgi?id=2799
fixes d9bc8472e7
This commit is contained in:
parent
329433af90
commit
88b410f800
@ -74,14 +74,10 @@ static void usage(void);
|
||||
Struct to carry client data. Note that it does not appear that the client
|
||||
data is actually used in this program.
|
||||
*/
|
||||
typedef struct _FAX_Client_Data
|
||||
typedef union _FAX_Client_Data
|
||||
{
|
||||
#if defined(_WIN32) && defined(USE_WIN32_FILEIO)
|
||||
intptr_t fh; /* Operating system file handle */
|
||||
#else
|
||||
thandle_t fh; /* Operating system file handle */
|
||||
int fd; /* Integer file descriptor */
|
||||
#endif
|
||||
|
||||
} FAX_Client_Data;
|
||||
|
||||
int
|
||||
@ -280,11 +276,11 @@ main(int argc, char* argv[])
|
||||
continue;
|
||||
}
|
||||
#if defined(_WIN32) && defined(USE_WIN32_FILEIO)
|
||||
client_data.fh = _get_osfhandle(fileno(in));
|
||||
client_data.fh = (thandle_t)_get_osfhandle(fileno(in));
|
||||
#else
|
||||
client_data.fd = fileno(in);
|
||||
#endif
|
||||
TIFFSetClientdata(faxTIFF, (thandle_t) &client_data);
|
||||
TIFFSetClientdata(faxTIFF, client_data.fh);
|
||||
TIFFSetFileName(faxTIFF, (const char*)argv[optind]);
|
||||
TIFFSetField(out, TIFFTAG_IMAGEWIDTH, xsize);
|
||||
TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user