summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2012-10-16 14:40:51 +0200
committerTor Andersson <tor.andersson@artifex.com>2012-11-16 14:05:07 +0100
commitfc3fb00dc71b796bb28c0ef7957f1ef630033516 (patch)
tree25b63c361aed7db238193f312e2f0fdde5a317d9 /fitz
parent433693b7cc813a7db2b1f8bbfe252550f6006ad2 (diff)
downloadmupdf-fc3fb00dc71b796bb28c0ef7957f1ef630033516.tar.xz
Only invert color values, not alpha, in fz_invert_pixmap_rect.
Diffstat (limited to 'fitz')
-rw-r--r--fitz/res_pixmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fitz/res_pixmap.c b/fitz/res_pixmap.c
index e9dea86a..f7fbf239 100644
--- a/fitz/res_pixmap.c
+++ b/fitz/res_pixmap.c
@@ -394,8 +394,9 @@ void fz_invert_pixmap_rect(fz_pixmap *image, fz_bbox rect)
p = image->samples + (unsigned int)((y * image->w + x0) * image->n);
for (x = x0; x < x1; x++)
{
- for (n = image->n; n > 0; n--, p++)
+ for (n = image->n; n > 1; n--, p++)
*p = 255 - *p;
+ p++;
}
}
}