summaryrefslogtreecommitdiff
path: root/extra/fbida/libpng-1.4.patch
blob: f8a80d4b284b46c85e342d189df0817986fa0745 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff -Naur fbida-2.07-orig/rd/read-png.c fbida-2.07/rd/read-png.c
--- fbida-2.07-orig/rd/read-png.c	2010-01-18 00:02:02.000000000 -0500
+++ fbida-2.07/rd/read-png.c	2010-01-18 00:06:09.000000000 -0500
@@ -69,8 +69,11 @@
     if (h->color_type == PNG_COLOR_TYPE_PALETTE)
 	png_set_palette_to_rgb(h->png);
     if (h->color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
-	png_set_gray_1_2_4_to_8(h->png);
-
+#if PNG_LIBPNG_VER < 10400
+      png_set_gray_1_2_4_to_8(h->png);
+#else
+    png_set_expand_gray_1_2_4_to_8(h->png);
+#endif
     if (png_get_bKGD(h->png, h->info, &file_bg)) {
 	png_set_background(h->png,file_bg,PNG_BACKGROUND_GAMMA_FILE,1,1.0);
     } else {