Commit Graph

49 Commits

Author SHA1 Message Date
Bob Friesenhahn
c51502913d * libtiff/tif_dirread.c (TIFFFetchStripThing): Free "data" also
upon failure to allocate "resizeddata".
* tools/tiff2ps.c (PSDataBW): Zero buffer *after* checking for
allocation failure, not before.
2011-05-31 17:10:18 +00:00
Bob Friesenhahn
bd77483087 * libtiff/tif_jpeg.c, tools/tiff2pdf.c, tools/tiff2ps.c: mark
NULL-deref and possible overflow
2011-05-31 17:00:03 +00:00
Bob Friesenhahn
959042fdcf Fix spelling typo in tiff2ps. 2011-04-09 16:53:08 +00:00
Lee Howard
01ff8dfe99 More improvements from Richard Nolde. 2010-11-26 23:26:46 +00:00
Lee Howard
4536beaed1 See: http://bugzilla.maptools.org/show_bug.cgi?id=1983
* tools/tiff2ps.c: improvements and enhancements from Richard Nolde
        with additional command line options for Document Title,
        Document Creator, and Page Orientation
2010-09-26 05:39:31 +00:00
Bob Friesenhahn
4e0d97f83c * libtiff/tif_aux.c (_TIFFCheckRealloc): Improve error message so
that it is clearly a memory allocation error message, and also
includes the size of the allocation request.
2010-03-10 18:56:48 +00:00
Frank Warmerdam
46bac877c5 avoid 32/64bit casting warnings 2009-01-22 21:12:45 +00:00
Frank Warmerdam
3db9feb595 introduce libport.h prototypes to reduce warnings 2009-01-22 20:53:07 +00:00
Bob Friesenhahn
506c21992e * test/tiffcrop.sh: New test script for tiffcrop from Richard
Nolde.

* tools/tiff2ps.c: Remove spurious message to stderr.
2009-01-12 16:23:11 +00:00
Bob Friesenhahn
d99686ccb2 * tools/tiff2ps.c: Incorporated significant functionality update
from Richard Nolde.  In particular, support for rotating the image
by 90, 180, 270, and 'auto' has been added.  Still waiting for
documentation patch to man/tiff2ps.1.

* man/tiffcrop.1: Incorporated documentation updates from Richard
Nolde.

* tools/tiffcrop.c: Incorporated significant functionality update
from Richard Nolde.
2009-01-11 20:04:22 +00:00
Bob Friesenhahn
953d02c32d * libtiff/tiffio.h: GCC will now validate format specifications
for TIFFError(), TIFFErrorExt(), TIFFWarning(), and
TIFFWarningExt() in order to reveal bugs.
* Many fixes throughout to work better as a 64-bit build.
2008-12-31 23:48:01 +00:00
Bob Friesenhahn
968401fdf3 * tools/{tiff2pdf.c, tiff2ps.c, tiffinfo.c}: Offset and length
tags now require 64-bit parameter rather than 32-bit.
* libtiff/tif_dirread.c: Fixed issues with unaligned access to
64-bit values.
2008-12-31 03:06:27 +00:00
Frank Warmerdam
e9cb45c2ee fix 64bit type issues 2008-01-07 15:47:54 +00:00
Andrey Kiselev
bf903e0588 Added support 16-bit images as per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=1566
Patch from William Bader.
2007-07-03 16:00:53 +00:00
Andrey Kiselev
6923ef1e64 Properly scale all the pages when converting multipage TIFF with
/width/height/center options set. As per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=1080
2006-02-23 14:50:32 +00:00
Andrey Kiselev
ca3bdcae22 Fixed typo in page size handling code. 2005-03-17 14:41:59 +00:00
Andrey Kiselev
2348dccc56 Calculate margins taking in account resolution unit (Richard Nolde). 2005-02-06 17:58:01 +00:00
Andrey Kiselev
6860033832 Fixed problem with page sizes as per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=742
2005-02-03 17:02:19 +00:00
Andrey Kiselev
007d721820 Interpret the -w and -h options independently. As per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=689
2005-01-12 12:51:26 +00:00
Andrey Kiselev
167d8a7378 Fixed wrong variable data type when read Position tags (Tristan Hill). 2004-10-30 13:46:33 +00:00
Andrey Kiselev
6572c7ae4c Fixed wrong variable data type when read Resolution tags (Peter Fales). 2004-10-28 17:56:46 +00:00
Andrey Kiselev
fc2fea250f Readability fixes. 2004-10-10 11:58:16 +00:00
Frank Warmerdam
6be58fbab2 avoid warnings 2004-09-09 18:06:14 +00:00
Andrey Kiselev
3446c24799 Work out getopt problems. 2004-08-25 18:34:55 +00:00
Andrey Kiselev
0abad54ad0 Avoid zero division in setupPageState() function;
properly initialize array in PSDataBW().
2004-08-25 13:14:18 +00:00
Andrey Kiselev
176881c3a0 Fixed problem with uninitialized values. 2004-08-23 13:16:54 +00:00
Andrey Kiselev
19421d5e88 Avoid warnings. 2004-06-05 08:13:06 +00:00
Andrey Kiselev
73e787830f Avoid warnings. 2004-06-04 14:16:14 +00:00
Andrey Kiselev
578b287f87 Added support for alfa channel. Fixes
http://bugzilla.remotesensing.org/show_bug.cgi?id=428
2003-12-19 15:30:27 +00:00
Andrey Kiselev
21bbbcaa45 #include <strings.h> replaced with #include <string.h> 2003-10-17 21:25:51 +00:00
Andrey Kiselev
c6b36db6ee Added missing #include <strings.h>. 2003-08-12 07:51:03 +00:00
Andrey Kiselev
1cbcc49d2f Fixed PS comment emitted when FlateDecode is being used. Reported by Tom
Kacvinsky.
2003-08-08 19:46:20 +00:00
Andrey Kiselev
af72982dab Fixed bug in Ascii85EncodeBlock() function: array index was out of range. 2003-05-07 08:12:30 +00:00
Andrey Kiselev
d7adbd23df Add ability to generate PS Level 3. It basically allows one to use the
/flateDecode filter for ZIP compressed TIFF images. Patch supplied by
 Tom Kacvinsky. Fixes http://bugzilla.remotesensing.org/show_bug.cgi?id=328

Force deadzone printing when EPS output specified as per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=325
2003-04-29 09:52:16 +00:00
Andrey Kiselev
c26da71049 Added library version reporting to all tools. 2003-03-12 14:05:05 +00:00
Frank Warmerdam
743a29c475 The change below fixes a problem where "tiff2ps -1e" did not make
the scanline buffer long enough when writing rgb triplets.
The scanline needs to be 3 X the number of dots or else it will
contain an incomplete triplet and programs that try to separate
the eps by redefining the colorimage operator will get messed up.

William
http://williambader.com
2002-10-15 02:39:09 +00:00
Andrey Kiselev
5ed96d05fb Fixed help formatting. 2002-10-10 14:19:26 +00:00
Andrey Kiselev
e985fcbddb *** empty log message *** 2002-10-07 13:15:29 +00:00
Andrey Kiselev
bd77199765 tools/tiff2ps.c, man/tiff2ps.1: Applied patch form Sebastian Eken (thanks,
Sebastian!). New switches:
-b # for a bottom margin of # inches
-c   center image
-l # for a left margin of # inches
-r   rotate the image by 180 degrees
New features merged with code for shrinking/overlapping. Previously added -c
and -n switches (for overriding PS units) renamed in -x and -y respectively.

http://bugzilla.remotesensing.org/show_bug.cgi?id=200
2002-10-07 12:49:32 +00:00
Frank Warmerdam
5ae8f23ee7 bug80 - remove BeginData/EndData from PostScript output 2002-09-08 17:49:22 +00:00
Andrey Kiselev
f2558c8426 Added workaround for some software that may crash when last strip
of image contains fewer number of scanlines than specified by the
`/Height' variable. See
http://bugzilla.remotesensing.org/show_bug.cgi?id=164 for explanation.
2002-06-22 10:32:56 +00:00
Andrey Kiselev
68db217599 New functionality for tiff2ps utility: splitting long images in several pages.
See http://bugzilla.remotesensing.org/show_bug.cgi?id=142 for explanation.
Patch granted by John Williams <williams@morinda.com>.
2002-06-21 10:24:40 +00:00
Andrey Kiselev
b7a6cf276a *** empty log message *** 2002-06-02 11:41:23 +00:00
Andrey Kiselev
ff51d7a6aa New commandline switches to override resolution units obtained from the input
file. Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=131
2002-05-10 10:45:43 +00:00
Andrey Kiselev
0aa0a6dbce Divide by zero fixed. Closes
http://bugzilla.remotesensing.org/show_bug.cgi?id=88
2002-04-09 20:48:53 +00:00
Frank Warmerdam
177169bf93 fixed last change 2001-09-08 17:28:08 +00:00
Frank Warmerdam
71715f2e02 add OJPEG support to tiff2ps 2001-09-08 17:27:38 +00:00
Frank Warmerdam
7a1ad5e9d9 Broad changes to tiff2ps by Bruce A. Mallett.
Fixed PS_Lvl2page() code which outputs non-ASCII85 raw
    data.  Moved test for when to output a line break to
    *after* the output of a character.  This just serves
    to fix an eye-nuisance where the first line of raw
    data was one character shorter than subsequent lines.

    Added an experimental ASCII85 encoder which can be used
    only when there is a single buffer of bytes to be encoded.
    This version is much faster at encoding a straight-line
    buffer of data because it can avoid alot of the loop
    overhead of the byte-by-bye version.  To use this version
    you need to define EXP_ASCII85ENCODER (experimental ...).

    Added bug fix given by Michael Schmidt to PS_Lvl2page()
    in which an end-of-data marker ('>') was not being output
    when producing non-ASCII85 encoded PostScript Level 2
    data.

    Fixed PS_Lvl2colorspace() so that it no longer assumes that
    a TIFF having more than 2 planes is a CMYK.  This routine
    no longer looks at the samples per pixel but instead looks
    at the "photometric" value.  This change allows support of
    CMYK TIFFs.

    Modified the PostScript L2 imaging loop so as to test if
    the input stream is still open before attempting to do a
    flushfile on it.  This was done because some RIPs close
    the stream after doing the image operation.

    Got rid of the realloc() being done inside a loop in the
    PSRawDataBW() routine.  The code now walks through the
    byte-size array outside the loop to determine the largest
    size memory block that will be needed.

    Added "-m" switch to ask tiff2ps to, where possible, use the
    "imagemask" operator instead of the "image" operator.

    Added the "-i #" switch to allow interpolation to be disabled.

    Unrolled a loop or two to improve performance.
2001-03-29 01:34:33 +00:00
Mike Welles
0ef31e1f62 Initial revision 1999-07-27 21:50:26 +00:00