From a5bfe0eef4361ec3ca8190b2533eca041eb7ef61 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 3 Apr 2011 19:51:52 +0200 Subject: draw: Fix regression introduced with bug 692117. Only scale grayscale images before color converting, at least until we figure out how to consistently handle premultiplied alpha with the smooth scaling and color conversion code. We must also take care not to scale indexed images! --- fitz/dev_draw.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'fitz/dev_draw.c') diff --git a/fitz/dev_draw.c b/fitz/dev_draw.c index b30508c8..e9cb74fc 100644 --- a/fitz/dev_draw.c +++ b/fitz/dev_draw.c @@ -597,11 +597,7 @@ fz_drawfillimage(void *user, fz_pixmap *image, fz_matrix ctm, float alpha) /* convert images with expensive colorspace transforms after scaling */ after = 0; - if (image->colorspace->n < model->n) - after = 1; - if (!strcmp(image->colorspace->name, "Separation")) - after = 1; - if (!strcmp(image->colorspace->name, "DeviceN")) + if (image->colorspace == fz_devicegray) after = 1; if (image->colorspace != model && !after) @@ -636,6 +632,7 @@ fz_drawfillimage(void *user, fz_pixmap *image, fz_matrix ctm, float alpha) } #endif + if (image->colorspace != model && after) { converted = fz_newpixmap(model, image->x, image->y, image->w, image->h); -- cgit v1.2.3