* tools/fax2tiff.c (main): Applied patch by Jörg Ahrens to fix
passing client data for Win32 builds using tif_win32.c (USE_WIN32_FILEIO defined) for file I/O. Patch was provided via email on November 20, 2016.
This commit is contained in:
parent
884f973652
commit
5ba49e2beb
@ -1,3 +1,10 @@
|
|||||||
|
2016-11-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
|
||||||
|
|
||||||
|
* tools/fax2tiff.c (main): Applied patch by Jörg Ahrens to fix
|
||||||
|
passing client data for Win32 builds using tif_win32.c
|
||||||
|
(USE_WIN32_FILEIO defined) for file I/O. Patch was provided via
|
||||||
|
email on November 20, 2016.
|
||||||
|
|
||||||
2016-11-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
|
2016-11-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
|
||||||
|
|
||||||
* libtiff 4.0.7 released.
|
* libtiff 4.0.7 released.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: fax2tiff.c,v 1.25 2016-10-25 22:22:45 erouault Exp $ */
|
/* $Id: fax2tiff.c,v 1.26 2016-11-20 18:04:52 bfriesen Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1990-1997 Sam Leffler
|
* Copyright (c) 1990-1997 Sam Leffler
|
||||||
@ -283,10 +283,11 @@ main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
#if defined(_WIN32) && defined(USE_WIN32_FILEIO)
|
#if defined(_WIN32) && defined(USE_WIN32_FILEIO)
|
||||||
client_data.fh = _get_osfhandle(fileno(in));
|
client_data.fh = _get_osfhandle(fileno(in));
|
||||||
|
TIFFSetClientdata(faxTIFF, (thandle_t) client_data.fh);
|
||||||
#else
|
#else
|
||||||
client_data.fd = fileno(in);
|
client_data.fd = fileno(in);
|
||||||
|
TIFFSetClientdata(faxTIFF, (thandle_t) client_data.fd);
|
||||||
#endif
|
#endif
|
||||||
TIFFSetClientdata(faxTIFF, (thandle_t) &client_data);
|
|
||||||
TIFFSetFileName(faxTIFF, (const char*)argv[optind]);
|
TIFFSetFileName(faxTIFF, (const char*)argv[optind]);
|
||||||
TIFFSetField(out, TIFFTAG_IMAGEWIDTH, xsize);
|
TIFFSetField(out, TIFFTAG_IMAGEWIDTH, xsize);
|
||||||
TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 1);
|
TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user