From 96cd67562433e491854a4b147cc0f8f2f37b6533 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Wed, 12 Sep 2018 03:33:11 +0800 Subject: Set the profile BGR flag for non-default ICC colorspaces too. --- source/fitz/colorspace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c index 2804d239..f0c8bfd7 100644 --- a/source/fitz/colorspace.c +++ b/source/fitz/colorspace.c @@ -3769,7 +3769,6 @@ fz_new_icc_colorspace(fz_context *ctx, enum fz_colorspace_type type, fz_buffer * const unsigned char *data; data = fz_lookup_icc(ctx, type, &size); profile->buffer = fz_new_buffer_from_shared_data(ctx, data, size); - profile->bgr = (type == FZ_COLORSPACE_BGR); flags |= FZ_COLORSPACE_IS_DEVICE; } else @@ -3790,6 +3789,8 @@ fz_new_icc_colorspace(fz_context *ctx, enum fz_colorspace_type type, fz_buffer * } } + profile->bgr = (type == FZ_COLORSPACE_BGR); + switch (type) { default: num = profile->num_devcomp; break; -- cgit v1.2.3