diff options
-rw-r--r-- | source/fitz/image.c | 2 | ||||
-rw-r--r-- | source/pdf/pdf-image.c | 3 | ||||
-rw-r--r-- | source/xps/xps-image.c | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/source/fitz/image.c b/source/fitz/image.c index 9a4d35a6..4728c5f3 100644 --- a/source/fitz/image.c +++ b/source/fitz/image.c @@ -402,6 +402,7 @@ fz_new_image_from_pixmap(fz_context *ctx, fz_pixmap *pixmap, fz_image *mask) image->h = pixmap->h; image->n = pixmap->n; image->colorspace = fz_keep_colorspace(ctx, pixmap->colorspace); + image->invert_cmyk_jpeg = 1; image->bpc = 8; image->buffer = NULL; image->get_pixmap = NULL; @@ -439,6 +440,7 @@ fz_new_image(fz_context *ctx, int w, int h, int bpc, fz_colorspace *colorspace, image->bpc = bpc; image->n = (colorspace ? colorspace->n : 1); image->colorspace = colorspace; + image->invert_cmyk_jpeg = 1; image->interpolate = interpolate; image->imagemask = imagemask; image->usecolorkey = (colorkey != NULL); diff --git a/source/pdf/pdf-image.c b/source/pdf/pdf-image.c index 87fa8f38..f04b3c04 100644 --- a/source/pdf/pdf-image.c +++ b/source/pdf/pdf-image.c @@ -159,15 +159,16 @@ pdf_load_image_imp(fz_context *ctx, pdf_document *doc, pdf_obj *rdb, pdf_obj *di int gen = pdf_to_gen(ctx, dict); buffer = pdf_load_compressed_stream(ctx, doc, num, gen); image = fz_new_image(ctx, w, h, bpc, colorspace, 96, 96, interpolate, imagemask, decode, usecolorkey ? colorkey : NULL, buffer, mask); + image->invert_cmyk_jpeg = 0; } else { /* Inline stream */ stride = (w * n * bpc + 7) / 8; image = fz_new_image(ctx, w, h, bpc, colorspace, 96, 96, interpolate, imagemask, decode, usecolorkey ? colorkey : NULL, NULL, mask); + image->invert_cmyk_jpeg = 0; pdf_load_compressed_inline_image(ctx, doc, dict, stride * h, cstm, indexed, image); } - } fz_catch(ctx) { diff --git a/source/xps/xps-image.c b/source/xps/xps-image.c index b0d00a2f..ddd63904 100644 --- a/source/xps/xps-image.c +++ b/source/xps/xps-image.c @@ -110,7 +110,6 @@ xps_parse_image_brush(fz_context *ctx, xps_document *doc, const fz_matrix *ctm, fz_try(ctx) { image = xps_load_image(ctx, doc, part); - image->invert_cmyk_jpeg = 1; } fz_always(ctx) { |