diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2012-10-16 14:40:51 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2012-11-16 14:05:07 +0100 |
commit | fc3fb00dc71b796bb28c0ef7957f1ef630033516 (patch) | |
tree | 25b63c361aed7db238193f312e2f0fdde5a317d9 /fitz | |
parent | 433693b7cc813a7db2b1f8bbfe252550f6006ad2 (diff) | |
download | mupdf-fc3fb00dc71b796bb28c0ef7957f1ef630033516.tar.xz |
Only invert color values, not alpha, in fz_invert_pixmap_rect.
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/res_pixmap.c | 3 |
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++; } } } |