- Backported some more TIFF fixes (bug #573970).

This commit is contained in:
Tim Waugh 2010-03-16 13:29:23 +00:00
parent 561959feca
commit 9156a8754c
2 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,59 @@
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);

View File

@ -34,6 +34,7 @@ Patch15: ghostscript-pdf2dsc.patch
Patch16: ghostscript-cups-realloc-color-depth.patch Patch16: ghostscript-cups-realloc-color-depth.patch
Patch17: ghostscript-tif-fail-close.patch Patch17: ghostscript-tif-fail-close.patch
Patch18: ghostscript-tiff-default-strip-size.patch Patch18: ghostscript-tiff-default-strip-size.patch
Patch19: ghostscript-tiff-fixes.patch
Requires: urw-fonts >= 1.1, ghostscript-fonts Requires: urw-fonts >= 1.1, ghostscript-fonts
BuildRequires: xz BuildRequires: xz
@ -160,6 +161,9 @@ rm -rf libpng zlib jpeg jasper
# Restore the TIFF default strip size of 0 (bug #571520). # Restore the TIFF default strip size of 0 (bug #571520).
%patch18 -p1 -b .tiff-default-strip-size %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 # Convert manual pages to UTF-8
from8859_1() { from8859_1() {
iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_" iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
@ -349,6 +353,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Tue Mar 16 2010 Tim Waugh <twaugh@redhat.com> 8.71-6 * Tue Mar 16 2010 Tim Waugh <twaugh@redhat.com> 8.71-6
- Backported some more TIFF fixes (bug #573970).
- Use upstream fix for TIFF default strip size (bug #571520). - Use upstream fix for TIFF default strip size (bug #571520).
* Mon Mar 15 2010 Tim Waugh <twaugh@redhat.com> 8.71-5 * Mon Mar 15 2010 Tim Waugh <twaugh@redhat.com> 8.71-5