Fix build with png-1.5.
This commit is contained in:
parent
82ff41d6b2
commit
b79bf3d3bb
2 changed files with 26 additions and 6 deletions
|
@ -1,8 +1,8 @@
|
||||||
$NetBSD: distinfo,v 1.9 2011/01/16 15:07:16 wiz Exp $
|
$NetBSD: distinfo,v 1.10 2011/01/17 10:36:54 wiz Exp $
|
||||||
|
|
||||||
SHA1 (texlive-20100720-source.tar.xz) = 713b861123e3d9e073e2c93d7ed3e13262d82c34
|
SHA1 (texlive-20100720-source.tar.xz) = 713b861123e3d9e073e2c93d7ed3e13262d82c34
|
||||||
RMD160 (texlive-20100720-source.tar.xz) = b1120f3377ca45b4d86911b99a95c2e6e45927b5
|
RMD160 (texlive-20100720-source.tar.xz) = b1120f3377ca45b4d86911b99a95c2e6e45927b5
|
||||||
Size (texlive-20100720-source.tar.xz) = 33484212 bytes
|
Size (texlive-20100720-source.tar.xz) = 33484212 bytes
|
||||||
SHA1 (patch-aa) = f28a82082bbec5385480fc4b7b6a61904536b287
|
SHA1 (patch-aa) = f28a82082bbec5385480fc4b7b6a61904536b287
|
||||||
SHA1 (patch-ab) = 14ca4c8610415f29975fcdda131b183ab08639f1
|
SHA1 (patch-ab) = f83f9de856e4b8a79b54b5c871c0966ced9b3b18
|
||||||
SHA1 (patch-am) = c6c08e8c1bace8e93eb737f64f2d2f5128db0bfd
|
SHA1 (patch-am) = c6c08e8c1bace8e93eb737f64f2d2f5128db0bfd
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
$NetBSD: patch-ab,v 1.3 2011/01/16 15:07:16 wiz Exp $
|
$NetBSD: patch-ab,v 1.4 2011/01/17 10:36:54 wiz Exp $
|
||||||
|
|
||||||
Incomplete fix to build with png-1.5.
|
Fix to build with png-1.5.
|
||||||
|
->transformations part removed on recommendation by John Bowler.
|
||||||
|
|
||||||
--- pdftexdir/writepng.c.orig 2010-06-22 15:35:42.000000000 +0000
|
--- pdftexdir/writepng.c.orig 2010-06-22 15:35:42.000000000 +0000
|
||||||
+++ pdftexdir/writepng.c
|
+++ pdftexdir/writepng.c
|
||||||
|
@ -70,7 +71,16 @@ Incomplete fix to build with png-1.5.
|
||||||
if (fixedpdfminorversion < 5)
|
if (fixedpdfminorversion < 5)
|
||||||
fixedimagehicolor = 0;
|
fixedimagehicolor = 0;
|
||||||
|
|
||||||
@@ -590,8 +597,7 @@ void write_png(integer img)
|
@@ -574,8 +581,6 @@ void write_png(integer img)
|
||||||
|
*/
|
||||||
|
if (fixedpdfminorversion > 1
|
||||||
|
&& png_interlace_type(img) == PNG_INTERLACE_NONE
|
||||||
|
- && (png_transformations(img) == PNG_TRANSFORM_IDENTITY
|
||||||
|
- || png_transformations(img) == 0x2000)
|
||||||
|
/* gamma */
|
||||||
|
&& !(png_ptr_color_type(img) == PNG_COLOR_TYPE_GRAY_ALPHA ||
|
||||||
|
png_ptr_color_type(img) == PNG_COLOR_TYPE_RGB_ALPHA)
|
||||||
|
@@ -590,8 +595,7 @@ void write_png(integer img)
|
||||||
pdfcreateobj(0, 0);
|
pdfcreateobj(0, 0);
|
||||||
palette_objnum = objptr;
|
palette_objnum = objptr;
|
||||||
pdf_printf("[/Indexed /DeviceRGB %i %i 0 R]\n",
|
pdf_printf("[/Indexed /DeviceRGB %i %i 0 R]\n",
|
||||||
|
@ -80,7 +90,7 @@ Incomplete fix to build with png-1.5.
|
||||||
break;
|
break;
|
||||||
case PNG_COLOR_TYPE_GRAY:
|
case PNG_COLOR_TYPE_GRAY:
|
||||||
pdf_puts("/DeviceGray\n");
|
pdf_puts("/DeviceGray\n");
|
||||||
@@ -605,11 +611,11 @@ void write_png(integer img)
|
@@ -605,11 +609,11 @@ void write_png(integer img)
|
||||||
if (palette_objnum > 0) {
|
if (palette_objnum > 0) {
|
||||||
pdfbegindict(palette_objnum, 0);
|
pdfbegindict(palette_objnum, 0);
|
||||||
pdfbeginstream();
|
pdfbeginstream();
|
||||||
|
@ -96,3 +106,13 @@ Incomplete fix to build with png-1.5.
|
||||||
}
|
}
|
||||||
pdfendstream();
|
pdfendstream();
|
||||||
}
|
}
|
||||||
|
@@ -619,9 +623,6 @@ void write_png(integer img)
|
||||||
|
if (fixedimageapplygamma &&
|
||||||
|
(checked_gamma > 1.01 || checked_gamma < 0.99))
|
||||||
|
tex_printf("gamma delta=%lf ", checked_gamma);
|
||||||
|
- if (png_transformations(img) != PNG_TRANSFORM_IDENTITY)
|
||||||
|
- tex_printf("transform=%lu",
|
||||||
|
- (long) png_transformations(img));
|
||||||
|
if ((png_color_type(img) != PNG_COLOR_TYPE_GRAY)
|
||||||
|
&& (png_color_type(img) != PNG_COLOR_TYPE_RGB)
|
||||||
|
&& (png_color_type(img) != PNG_COLOR_TYPE_PALETTE))
|
||||||
|
|
Loading…
Reference in a new issue