openbsd-ports/graphics/imlib/patches/patch-gdk_imlib_io-png_c
2002-05-17 02:42:15 +00:00

14 lines
537 B
Plaintext

$OpenBSD: patch-gdk_imlib_io-png_c,v 1.2 2002/05/17 02:42:15 brad Exp $
--- gdk_imlib/io-png.c.orig Mon Mar 4 12:06:29 2002
+++ gdk_imlib/io-png.c Thu May 16 22:12:55 2002
@@ -299,7 +299,8 @@ inline_png(unsigned char *data, int data
im->rgb_width = ww;
im->rgb_height = hh;
/* Setup Translators */
- if (color_type == PNG_COLOR_TYPE_PALETTE)
+ if ((color_type == PNG_COLOR_TYPE_PALETTE) ||
+ (color_type == PNG_COLOR_TYPE_GRAY))
png_set_expand(png_ptr);
png_set_strip_16(png_ptr);
png_set_packing(png_ptr);