rpms/ghostscript/F-13 ghostscript-tiff-fixes.patch, NONE, 1.1 ghostscript.spec, 1.214, 1.215

Tim Waugh twaugh at fedoraproject.org
Tue Mar 16 13:05:56 UTC 2010


Author: twaugh

Update of /cvs/pkgs/rpms/ghostscript/F-13
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7665

Modified Files:
	ghostscript.spec 
Added Files:
	ghostscript-tiff-fixes.patch 
Log Message:
* Tue Mar 16 2010 Tim Waugh <twaugh at redhat.com> 8.71-9
- Backported some more TIFF fixes (bug #573970).


ghostscript-tiff-fixes.patch:
 gdevtfnx.c |    2 ++
 gdevtifs.c |    6 ++++--
 gdevtsep.c |    7 +++++++
 3 files changed, 13 insertions(+), 2 deletions(-)

--- NEW FILE ghostscript-tiff-fixes.patch ---
diff -up ghostscript-8.71/base/gdevtfnx.c.tiff-fixes ghostscript-8.71/base/gdevtfnx.c
--- ghostscript-8.71/base/gdevtfnx.c.tiff-fixes	2010-02-04 17:47:57.000000000 +0000
+++ ghostscript-8.71/base/gdevtfnx.c	2010-03-16 10:04:00.686600827 +0000
@@ -105,6 +105,8 @@ tiff12_print_page(gx_device_printer * pd
     TIFFSetField(tfdev->tif, TIFFTAG_BITSPERSAMPLE, 4);
     tiff_set_rgb_fields(tfdev);
 
+    TIFFCheckpointDirectory(tfdev->tif);
+
     /* Write the page data. */
     {
 	int y;
diff -up ghostscript-8.71/base/gdevtifs.c.tiff-fixes ghostscript-8.71/base/gdevtifs.c
--- ghostscript-8.71/base/gdevtifs.c.tiff-fixes	2010-02-04 17:47:57.000000000 +0000
+++ ghostscript-8.71/base/gdevtifs.c	2010-03-16 10:04:00.689600292 +0000
@@ -243,8 +243,8 @@ int tiff_set_fields_for_printer(gx_devic
     TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
 
     TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH);
-    TIFFSetField(tif, TIFFTAG_XRESOLUTION, pdev->x_pixels_per_inch);
-    TIFFSetField(tif, TIFFTAG_YRESOLUTION, pdev->y_pixels_per_inch);
+    TIFFSetField(tif, TIFFTAG_XRESOLUTION, (float)pdev->x_pixels_per_inch);
+    TIFFSetField(tif, TIFFTAG_YRESOLUTION, (float)pdev->y_pixels_per_inch);
 
     {
 	char revs[10];
@@ -293,6 +293,8 @@ tiff_print_page(gx_device_printer *dev, 
     if (data == NULL)
 	return_error(gs_error_VMerror);
 
+    TIFFCheckpointDirectory(tif);
+
     memset(data, 0, max_size);
     for (row = 0; row < dev->height; row++) {
 	code = gdev_prn_copy_scan_lines(dev, row, data, size);
diff -up ghostscript-8.71/base/gdevtsep.c.tiff-fixes ghostscript-8.71/base/gdevtsep.c
--- ghostscript-8.71/base/gdevtsep.c.tiff-fixes	2010-02-04 17:47:57.000000000 +0000
+++ ghostscript-8.71/base/gdevtsep.c	2010-03-16 10:04:00.700601143 +0000
@@ -1438,6 +1438,10 @@ tiffsep_print_page(gx_device_printer * p
 	    return_error(gs_error_VMerror);
 	}
 
+	for (comp_num = 0; comp_num < num_comp; comp_num++ )
+	    TIFFCheckpointDirectory(tfdev->tiff[comp_num]);
+	TIFFCheckpointDirectory(tfdev->tiff_comp);
+
         /* Write the page data. */
 	for (y = 0; y < pdev->height; ++y) {
 	    code = gdev_prn_get_bits(pdev, y, line, &row);
@@ -1603,6 +1607,9 @@ tiffsep1_print_page(gx_device_printer * 
 	if (line == NULL || unpacked == NULL || dithered_line == NULL)
 	    return_error(gs_error_VMerror);
 
+        for (comp_num = 0; comp_num < num_comp; comp_num++ )
+	    TIFFCheckpointDirectory(tfdev->tiff[comp_num]);
+
         /* Loop for the lines */
 	for (y = 0; y < pdev->height; ++y) {
 	    code = gdev_prn_get_bits(pdev, y, line, &row);


Index: ghostscript.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ghostscript/F-13/ghostscript.spec,v
retrieving revision 1.214
retrieving revision 1.215
diff -u -p -r1.214 -r1.215
--- ghostscript.spec	16 Mar 2010 10:00:10 -0000	1.214
+++ ghostscript.spec	16 Mar 2010 13:05:56 -0000	1.215
@@ -34,6 +34,7 @@ Patch15: ghostscript-pdf2dsc.patch
 Patch16: ghostscript-cups-realloc-color-depth.patch
 Patch17: ghostscript-tif-fail-close.patch
 Patch18: ghostscript-tiff-default-strip-size.patch
+Patch19: ghostscript-tiff-fixes.patch
 
 Requires: urw-fonts >= 1.1, ghostscript-fonts
 BuildRequires: xz
@@ -162,6 +163,9 @@ rm -rf libpng zlib jpeg jasper
 # Restore the TIFF default strip size of 0 (bug #571520).
 %patch18 -p1 -b .tiff-default-strip-size
 
+# Backported some more TIFF fixes (bug #573970).
+%patch19 -p1 -b .tiff-fixes
+
 # Convert manual pages to UTF-8
 from8859_1() {
         iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
@@ -342,6 +346,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %changelog
 * Tue Mar 16 2010 Tim Waugh <twaugh at redhat.com> 8.71-9
+- Backported some more TIFF fixes (bug #573970).
 - Use upstream fix for TIFF default strip size (bug #571520).
 
 * Mon Mar 15 2010 Tim Waugh <twaugh at redhat.com> 8.71-8



More information about the scm-commits mailing list