diff options
Diffstat (limited to 'source/fitz/load-tiff.c')
-rw-r--r-- | source/fitz/load-tiff.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c index f473802b..2850e278 100644 --- a/source/fitz/load-tiff.c +++ b/source/fitz/load-tiff.c @@ -188,9 +188,12 @@ fz_decode_tiff_jpeg(struct tiff *tiff, fz_stream *chain, unsigned char *wp, int { fz_stream *stm; fz_stream *jpegtables = NULL; + int color_transform = -1; /* unset */ if (tiff->jpegtables && (int)tiff->jpegtableslen > 0) jpegtables = fz_open_memory(tiff->ctx, tiff->jpegtables, (int)tiff->jpegtableslen); - stm = fz_open_dctd(chain, -1, 0, jpegtables); + if (tiff->photometric == 2 /* RGB */ || tiff->photometric == 3 /* RGBPal */) + color_transform = 0; + stm = fz_open_dctd(chain, color_transform, 0, jpegtables); fz_read(stm, wp, wlen); fz_close(stm); } |