[cairo-commit] src/cairo-image-surface.c
Adrian Johnson
ajohnson at kemper.freedesktop.org
Wed Apr 4 03:24:07 PDT 2012
src/cairo-image-surface.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 7a262fd398c8a1f3c9052e8d9ec459e27ff91b4d
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Wed Apr 4 19:53:09 2012 +0930
fix bug in _cairo_image_analyze_color
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 8208a15..e860e1b 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -1130,9 +1130,12 @@ _cairo_image_analyze_color (cairo_image_surface_t *image)
if (image->color != CAIRO_IMAGE_UNKNOWN_COLOR)
return image->color;
- if (image->format == CAIRO_FORMAT_A1 || image->format == CAIRO_FORMAT_A8)
+ if (image->format == CAIRO_FORMAT_A1)
return image->color = CAIRO_IMAGE_IS_MONOCHROME;
+ if (image->format == CAIRO_FORMAT_A8)
+ return image->color = CAIRO_IMAGE_IS_GRAYSCALE;
+
if (image->format == CAIRO_FORMAT_ARGB32) {
image->color = CAIRO_IMAGE_IS_MONOCHROME;
for (y = 0; y < image->height; y++) {
More information about the cairo-commit
mailing list