summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-06-09 09:38:02 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2014-06-09 09:38:02 (GMT)
commit8798e2cb4467ac762c302775e52610d1f37d38f0 (patch)
tree65a4f0431004db89527d81aa4a03b9239bc6f8f4
parent0976a623848f537887d43e35f60ebad1ea230821 (diff)
downloadalphagen-8798e2cb4467ac762c302775e52610d1f37d38f0.tar.gz
alphagen-8798e2cb4467ac762c302775e52610d1f37d38f0.tar.bz2
Fix bug in detection of unsupported input colour formats.
-rw-r--r--src/alphagen.c2
1 files changed, 1 insertions, 1 deletions
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))