diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-10-25 23:18:33 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-11-02 00:18:08 +0800 |
commit | a605a0efb83fb3bec8983752c2fe000785746f74 (patch) | |
tree | 791932d713f354aedeca9b78d24ba956a61b0c2d /source/fitz | |
parent | feee1fce120ddd0273fab03a32912487468f4c29 (diff) | |
download | mupdf-a605a0efb83fb3bec8983752c2fe000785746f74.tar.xz |
Explain conversion to RGB in jpx/jxr image loading.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/load-jpx.c | 2 | ||||
-rw-r--r-- | source/fitz/load-jxr.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c index 491c5a2e..9eb5e2ed 100644 --- a/source/fitz/load-jpx.c +++ b/source/fitz/load-jpx.c @@ -423,6 +423,7 @@ jpx_read_image(fz_context *ctx, fz_jpxd *state, unsigned char *data, size_t size if (state->pix->alpha && ! (state->palette && !state->expand_indexed)) { + /* CMYK is a subtractive colorspace, we want additive for premul alpha */ if (state->pix->n == 5) { fz_pixmap *tmp = fz_new_pixmap(ctx, fz_device_rgb(ctx), state->pix->w, state->pix->h, 1); @@ -909,6 +910,7 @@ jpx_read_image(fz_context *ctx, unsigned char *data, size_t size, fz_colorspace if (a) { + /* CMYK is a subtractive colorspace, we want additive for premul alpha */ if (n == 4) { fz_pixmap *tmp = fz_new_pixmap(ctx, fz_device_rgb(ctx), w, h, 1); diff --git a/source/fitz/load-jxr.c b/source/fitz/load-jxr.c index f3809e69..4321c32f 100644 --- a/source/fitz/load-jxr.c +++ b/source/fitz/load-jxr.c @@ -408,6 +408,7 @@ fz_load_jxr(fz_context *ctx, unsigned char *data, size_t size) if (info.has_alpha && !info.has_premul) { + /* CMYK is a subtractive colorspace, we want additive for premul alpha */ if (info.comps >= 4) { fz_pixmap *rgb = fz_new_pixmap(ctx, fz_device_rgb(ctx), image->w, image->h, 1); |