diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-10-14 13:16:08 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-10-14 13:40:25 +0200 |
commit | 3722dcf128a98e9e92774b3f8f7326ee2ad98e84 (patch) | |
tree | e98f73659c6b0f46039ad3f94aac0cc570077a09 /source | |
parent | 6bfb34fc98dfec2e5cb24888a240cfd651dc511b (diff) | |
download | mupdf-3722dcf128a98e9e92774b3f8f7326ee2ad98e84.tar.xz |
Scale colors of JPEG2000 images with bit depths less than eight.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/load-jpx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c index 7cd36474..6b92e5c8 100644 --- a/source/fitz/load-jpx.c +++ b/source/fitz/load-jpx.c @@ -224,6 +224,8 @@ fz_load_jpx(fz_context *ctx, unsigned char *data, int size, fz_colorspace *defcs v = v + (1 << (depth - 1)); if (depth > 8) v = v >> (depth - 8); + else if (depth < 8) + v = v << (8 - depth); *p++ = v; } if (!a) |