diff options
author | faxguy <faxguy> | 2015-06-13 05:32:13 +0000 |
---|---|---|
committer | faxguy <faxguy> | 2015-06-13 05:32:13 +0000 |
commit | 140419ef153d8606cba0e9237d90452a8df1ddfe (patch) | |
tree | c21a0eacf3da38c65213700dfed25668e00caaa0 /tools | |
parent | a06648b7fc48f8bcb7f293efba72eba4d126572c (diff) | |
download | libtiff-140419ef153d8606cba0e9237d90452a8df1ddfe.tar.gz |
From Antti S. Lankila on:
http://bugzilla.maptools.org/show_bug.cgi?id=2078#c9
The problem is that TIFF library attempts to write TIFF header as soon as the
tiff2pdf utility initializes the library. Fortunately, the library contains an
I/O abstraction feature, so there are no hardcoded writes to a file descriptor
anywhere. In particular, it appears that the utility's output suppression
feature can be used to suppress the initial write of the header.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tiff2pdf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c index af4a4fef..42730276 100644 --- a/tools/tiff2pdf.c +++ b/tools/tiff2pdf.c @@ -1,4 +1,4 @@ -/* $Id: tiff2pdf.c,v 1.86 2015-06-13 05:14:57 faxguy Exp $ +/* $Id: tiff2pdf.c,v 1.87 2015-06-13 05:32:13 faxguy Exp $ * * tiff2pdf - converts a TIFF image to a PDF document * @@ -766,7 +766,7 @@ int main(int argc, char** argv){ /* * Output */ - t2p->outputdisable = 0; + t2p->outputdisable = 1; if (outfilename) { t2p->outputfile = fopen(outfilename, "wb"); if (t2p->outputfile == NULL) { @@ -784,6 +784,7 @@ int main(int argc, char** argv){ t2p_readproc, t2p_writeproc, t2p_seekproc, t2p_closeproc, t2p_sizeproc, t2p_mapproc, t2p_unmapproc); + t2p->outputdisable = 0; if (output == NULL) { TIFFError(TIFF2PDF_MODULE, "Can't initialize output descriptor"); |