summaryrefslogtreecommitdiff
path: root/tools/tiff2ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tiff2ps.c')
-rw-r--r--tools/tiff2ps.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/tiff2ps.c b/tools/tiff2ps.c
index 2d02b238..108d2cea 100644
--- a/tools/tiff2ps.c
+++ b/tools/tiff2ps.c
@@ -1,4 +1,4 @@
-/* $Id: tiff2ps.c,v 1.35.2.7 2011-04-09 16:53:56 bfriesen Exp $ */
+/* $Id: tiff2ps.c,v 1.35.2.8 2013-01-26 02:23:07 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -44,6 +44,11 @@
/*
* Revision history
+ * 2013-Jan-21
+ * Richard Nolde: Fix bug in auto rotate option code. Once a
+ * rotation angle was set by the auto rotate check, it was
+ * retained for all pages that followed instead of being
+ * retested for each page.
*
* 2010-Sep-17
* Richard Nolde: Reinstate code from Feb 2009 that never got
@@ -423,9 +428,10 @@ main(int argc, char* argv[])
/* auto rotate requires a specified page width and height */
if (auto_rotate == TRUE)
{
+ /*
if ((pageWidth == 0) || (pageHeight == 0))
TIFFWarning ("-r auto", " requires page height and width specified with -h and -w");
-
+ */
if ((maxPageWidth > 0) || (maxPageHeight > 0))
{
TIFFError ("-r auto", " is incompatible with maximum page width/height specified by -H or -W");
@@ -1594,6 +1600,8 @@ int TIFF2PS(FILE* fd, TIFF* tif, double pgwidth, double pgheight, double lm, dou
}
if (generateEPSF)
break;
+ if (auto_rotate)
+ rotation = 0.0;
TIFFGetFieldDefaulted(tif, TIFFTAG_SUBFILETYPE, &subfiletype);
} while (((subfiletype & FILETYPE_PAGE) || printAll) && TIFFReadDirectory(tif));