diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-12-04 22:53:54 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-12-04 22:53:54 +0000 |
commit | 2f54f3ec4fb3c8c77f7c71032d6663081359296a (patch) | |
tree | 7918d38f5e663f0229a9f38827b55bd8c32469fc | |
parent | cf4e4a89c9614198fc0e38dc2f740ca1c05ab867 (diff) | |
download | mupdf-2f54f3ec4fb3c8c77f7c71032d6663081359296a.tar.xz |
Support 24-bit sampled functions.
-rw-r--r-- | mupdf/pdf_function.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mupdf/pdf_function.c b/mupdf/pdf_function.c index efbc5e0d..a44e545d 100644 --- a/mupdf/pdf_function.c +++ b/mupdf/pdf_function.c @@ -1071,6 +1071,12 @@ loadsamplefunc(pdf_function *func, pdf_xref *xref, fz_obj *dict, int num, int ge x = (x << 8) + fz_readbyte(stream); s = x / 65535.0f; } + else if (bps == 24) { + unsigned int x = fz_readbyte(stream); + x = (x << 8) + fz_readbyte(stream); + x = (x << 8) + fz_readbyte(stream); + s = x / 16777216.0f; + } else if (bps == 32) { unsigned int x = fz_readbyte(stream); x = (x << 8) + fz_readbyte(stream); |