summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/fitz/load-jpx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c
index 583aec02..17e78d7e 100644
--- a/source/fitz/load-jpx.c
+++ b/source/fitz/load-jpx.c
@@ -852,6 +852,9 @@ jpx_read_image(fz_context *ctx, unsigned char *data, size_t size, fz_colorspace
}
}
+ if (jpx->color_space == OPJ_CLRSPC_SYCC && n == 3 && a == 0)
+ jpx_ycc_to_rgb(ctx, img, 1, 1);
+
if (a)
{
/* CMYK is a subtractive colorspace, we want additive for premul alpha */
@@ -865,9 +868,6 @@ jpx_read_image(fz_context *ctx, unsigned char *data, size_t size, fz_colorspace
}
}
- if (jpx->color_space == OPJ_CLRSPC_SYCC && n == 3 && a == 0)
- jpx_ycc_to_rgb(ctx, img, 1, 1);
-
opj_image_destroy(jpx);
return img;