diff options
| author | Matthieu Darbois <mayeut@users.noreply.github.com> | 2015-08-21 19:48:31 +0200 |
|---|---|---|
| committer | Matthieu Darbois <mayeut@users.noreply.github.com> | 2015-08-21 19:48:31 +0200 |
| commit | 3109759fd772ead96ceb851ea760e6596277da22 (patch) | |
| tree | 2a6b9aca07ddca9bc49a5fc72650dee852631b60 /src/bin/jp2 | |
| parent | dc34a6cc8cef7669a67177dd19a3854709e1ae92 (diff) | |
| parent | 238f4419abb035200ce1cf56f9da677f5eca8afb (diff) | |
Merge pull request #559 from szukw000/cmyk-cielab-esycc
Add support for CIELab, EYCC and CMYK
Diffstat (limited to 'src/bin/jp2')
| -rw-r--r-- | src/bin/jp2/opj_decompress.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c index 6630e2ef..76f592fd 100644 --- a/src/bin/jp2/opj_decompress.c +++ b/src/bin/jp2/opj_decompress.c @@ -1349,10 +1349,6 @@ int main(int argc, char **argv) /* Close the byte stream */ opj_stream_destroy(l_stream); - if(image->color_space == OPJ_CLRSPC_SYCC){ - color_sycc_to_rgb(image); /* FIXME */ - } - if( image->color_space != OPJ_CLRSPC_SYCC && image->numcomps == 3 && image->comps[0].dx == image->comps[0].dy && image->comps[1].dx != 1 ) @@ -1360,9 +1356,24 @@ int main(int argc, char **argv) else if (image->numcomps <= 2) image->color_space = OPJ_CLRSPC_GRAY; + if(image->color_space == OPJ_CLRSPC_SYCC){ + color_sycc_to_rgb(image); + } + else + if(image->color_space == OPJ_CLRSPC_CMYK){ + color_cmyk_to_rgb(image); + } + else + if(image->color_space == OPJ_CLRSPC_EYCC){ + color_esycc_to_rgb(image); + } + if(image->icc_profile_buf) { #if defined(OPJ_HAVE_LIBLCMS1) || defined(OPJ_HAVE_LIBLCMS2) - color_apply_icc_profile(image); /* FIXME */ + if(image->icc_profile_len) + color_apply_icc_profile(image); + else + color_apply_conversion(image); #endif free(image->icc_profile_buf); image->icc_profile_buf = NULL; image->icc_profile_len = 0; |
