summaryrefslogtreecommitdiff
path: root/fitz/dev_draw.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-04-03 19:51:52 +0200
committerTor Andersson <tor.andersson@artifex.com>2011-04-03 19:51:52 +0200
commita5bfe0eef4361ec3ca8190b2533eca041eb7ef61 (patch)
tree517041bcc24c9b2a03aa3ff095a1e4b1bf57861c /fitz/dev_draw.c
parentbf9428f174f38d8d2a5a949d0671f0fcbf956a29 (diff)
downloadmupdf-a5bfe0eef4361ec3ca8190b2533eca041eb7ef61.tar.xz
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!
Diffstat (limited to 'fitz/dev_draw.c')
-rw-r--r--fitz/dev_draw.c7
1 files changed, 2 insertions, 5 deletions
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);