From 8798e2cb4467ac762c302775e52610d1f37d38f0 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 9 Jun 2014 10:38:02 +0100 Subject: Fix bug in detection of unsupported input colour formats. --- src/alphagen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alphagen.c b/src/alphagen.c index 384e70b..6ced487 100644 --- a/src/alphagen.c +++ b/src/alphagen.c @@ -317,7 +317,7 @@ bool image_read_png(char *file_name, struct image *img) bit_depth = png_get_bit_depth(png_ptr, info_ptr); color_type = png_get_color_type(png_ptr, info_ptr); - if (color_type != PNG_COLOR_TYPE_RGB && bit_depth != 8) + if (color_type != PNG_COLOR_TYPE_RGB || bit_depth != 8) return false; if (!image_init(img, width, height, 3)) -- cgit v1.2.3