From 2f54f3ec4fb3c8c77f7c71032d6663081359296a Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 4 Dec 2010 22:53:54 +0000 Subject: Support 24-bit sampled functions. --- mupdf/pdf_function.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit v1.2.3