$NetBSD: patch-ab,v 1.5 2002/03/19 16:16:08 wiz Exp $

--- Imlib/load.c.orig	Wed Mar 13 19:06:29 2002
+++ Imlib/load.c
@@ -254,7 +254,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++)
 	{
@@ -279,6 +280,7 @@
 	    }
 	}
     }
+#if 0
   else if (color_type == PNG_COLOR_TYPE_GRAY)
     {
       for (y = 0; y < *h; y++)
@@ -294,6 +296,7 @@
 	    }
 	}
     }
+#endif
   else
     {
       for (y = 0; y < *h; y++)
