summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/draw-unpack.c4
-rw-r--r--source/fitz/load-tiff.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/source/fitz/draw-unpack.c b/source/fitz/draw-unpack.c
index e3c4c5b2..2b6a241e 100644
--- a/source/fitz/draw-unpack.c
+++ b/source/fitz/draw-unpack.c
@@ -10,6 +10,8 @@
#define get4(buf,x) ((buf[x >> 1] >> ( ( 1 - (x & 1) ) << 2 ) ) & 15 )
#define get8(buf,x) (buf[x])
#define get16(buf,x) (buf[x << 1])
+#define get24(buf,x) (buf[(x << 1) + x])
+#define get32(buf,x) (buf[x << 2])
static unsigned char get1_tab_1[256][8];
static unsigned char get1_tab_1p[256][16];
@@ -186,6 +188,8 @@ fz_unpack_tile(fz_context *ctx, fz_pixmap *dst, unsigned char * restrict src, in
case 4: *dp++ = get4(sp, b) * scale; break;
case 8: *dp++ = get8(sp, b); break;
case 16: *dp++ = get16(sp, b); break;
+ case 24: *dp++ = get24(sp, b); break;
+ case 32: *dp++ = get32(sp, b); break;
}
b++;
}
diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c
index 76df053a..56140e89 100644
--- a/source/fitz/load-tiff.c
+++ b/source/fitz/load-tiff.c
@@ -430,6 +430,8 @@ tiff_paste_tile(fz_context *ctx, struct tiff *tiff, unsigned char *tile, unsigne
case 4: *dst |= (*src >> (4 - 4 * ((col + x) % 2))) & 0xf; break;
case 8: *dst = *src; break;
case 16: dst[0] = src[0]; dst[1] = src[1]; break;
+ case 24: dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; break;
+ case 32: dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; dst[3] = src[3]; break;
}
}
}