diff options
author | wiz <wiz> | 2000-06-17 01:09:35 +0000 |
---|---|---|
committer | wiz <wiz> | 2000-06-17 01:09:35 +0000 |
commit | bd8a5c789e7fafbc5613711e79b26852872b48fa (patch) | |
tree | 4d8882813287de46a13dcf28abfe731faa3d99f5 /graphics | |
parent | d1bf8dafb4e403470b29a9b7a0a362b767a02032 (diff) | |
download | pkgsrc-bd8a5c789e7fafbc5613711e79b26852872b48fa.tar.gz |
Fix grayscale PNG display. Patch supplied by Dieter Baron in private mail.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/imlib/files/patch-sum | 8 | ||||
-rw-r--r-- | graphics/imlib/patches/patch-aa | 40 | ||||
-rw-r--r-- | graphics/imlib/patches/patch-ab | 40 |
3 files changed, 83 insertions, 5 deletions
diff --git a/graphics/imlib/files/patch-sum b/graphics/imlib/files/patch-sum index 2402ac121c3..31eefb530b3 100644 --- a/graphics/imlib/files/patch-sum +++ b/graphics/imlib/files/patch-sum @@ -1,6 +1,4 @@ -$NetBSD: patch-sum,v 1.5 2000/06/09 11:06:21 wiz Exp $ +$NetBSD: patch-sum,v 1.6 2000/06/17 01:09:35 wiz Exp $ -This placeholder file is generated by the ``makepatchsum'' target -whenever the patches directory is empty or missing. Its purpose -is to ensure that the presence of any obsolete patches will cause -the proper error to be emitted at build time. +MD5 (patch-aa) = 1a4d46ccad38707e83ee787b0fd0f341 +MD5 (patch-ab) = bc854a96aaa65d7548862dee8a2303b2 diff --git a/graphics/imlib/patches/patch-aa b/graphics/imlib/patches/patch-aa new file mode 100644 index 00000000000..c4c76d978f2 --- /dev/null +++ b/graphics/imlib/patches/patch-aa @@ -0,0 +1,40 @@ +$NetBSD: patch-aa,v 1.11 2000/06/17 01:09:36 wiz Exp $ + +--- gdk_imlib/io-png.c.orig Sun Oct 3 21:17:35 1999 ++++ gdk_imlib/io-png.c Sat Jun 17 02:58:44 2000 +@@ -61,6 +61,9 @@ + /* Setup Translators */ + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_expand(png_ptr); ++ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) ++ png_set_expand(png_ptr); ++ + png_set_strip_16(png_ptr); + png_set_packing(png_ptr); + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) +@@ -97,7 +100,8 @@ + png_read_image(png_ptr, lines); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + ptr = data; +- if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) ++ if (color_type == PNG_COLOR_TYPE_GRAY ++ || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + for (y = 0; y < *h; y++) + { +@@ -122,6 +126,7 @@ + } + } + } ++#if 0 + else if (color_type == PNG_COLOR_TYPE_GRAY) + { + for (y = 0; y < *h; y++) +@@ -136,6 +141,7 @@ + } + } + } ++#endif + else + { + for (y = 0; y < *h; y++) diff --git a/graphics/imlib/patches/patch-ab b/graphics/imlib/patches/patch-ab new file mode 100644 index 00000000000..e6f345f8db5 --- /dev/null +++ b/graphics/imlib/patches/patch-ab @@ -0,0 +1,40 @@ +$NetBSD: patch-ab,v 1.3 2000/06/17 01:09:36 wiz Exp $ + +--- Imlib/load.c.orig Sun Oct 3 21:17:35 1999 ++++ Imlib/load.c Sat Jun 17 02:58:25 2000 +@@ -209,6 +209,9 @@ + /* Setup Translators */ + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_expand(png_ptr); ++ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) ++ png_set_expand(png_ptr); ++ + png_set_strip_16(png_ptr); + png_set_packing(png_ptr); + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) +@@ -247,7 +250,8 @@ + png_read_image(png_ptr, lines); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + ptr = data; +- if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) ++ if (color_type == PNG_COLOR_TYPE_GRAY ++ || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + for (y = 0; y < *h; y++) + { +@@ -272,6 +276,7 @@ + } + } + } ++#if 0 + else if (color_type == PNG_COLOR_TYPE_GRAY) + { + for (y = 0; y < *h; y++) +@@ -286,6 +291,7 @@ + } + } + } ++#endif + else + { + for (y = 0; y < *h; y++) |