diff options
author | Simon Bünzli <zeniko@gmail.com> | 2014-07-18 16:01:45 +0200 |
---|---|---|
committer | Simon Bünzli <zeniko@gmail.com> | 2014-07-18 16:01:45 +0200 |
commit | 36aed33b337bd24b4a0491389f8e9dc27ffb058c (patch) | |
tree | fef9c61b5024185f043ccbdfbf77d5855998f2bd /source/fitz | |
parent | fe187681d8f59dea89a09dd9ee48f757a3ded3bb (diff) | |
download | mupdf-36aed33b337bd24b4a0491389f8e9dc27ffb058c.tar.xz |
allow 1-bit colormaps for TIFF images
The TIFF specification seems to only allow for 4-bit and 8-bit
colormaps. However at least Microsoft's XPS viewer also accepts 1-bit
colormaps and our current code handles this case already anyway.
See https://code.google.com/p/sumatrapdf/issues/detail?id=2562 for a
sample document.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/load-tiff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c index a9325f18..52df3de3 100644 --- a/source/fitz/load-tiff.c +++ b/source/fitz/load-tiff.c @@ -291,7 +291,7 @@ fz_expand_tiff_colormap(struct tiff *tiff) if (tiff->samplesperpixel != 1 && tiff->samplesperpixel != 2) fz_throw(tiff->ctx, FZ_ERROR_GENERIC, "invalid number of samples for RGBPal"); - if (tiff->bitspersample != 4 && tiff->bitspersample != 8) + if (tiff->bitspersample != 1 && tiff->bitspersample != 4 && tiff->bitspersample != 8) fz_throw(tiff->ctx, FZ_ERROR_GENERIC, "invalid number of bits for RGBPal"); if (tiff->colormaplen < (unsigned)maxval * 3) |