diff options
| author | Mickael Savinaud <savmickael@users.noreply.github.com> | 2013-03-24 23:12:41 +0000 |
|---|---|---|
| committer | Mickael Savinaud <savmickael@users.noreply.github.com> | 2013-03-24 23:12:41 +0000 |
| commit | bf0fa4089fa33a4447054ff883acc92da604de52 (patch) | |
| tree | 5f4eae768dae4350e042d1c065975e65e7ee4281 /src/bin | |
| parent | 07ae149955db833fea2a785c9655153252751bc1 (diff) | |
[trunk] enhance the support of sYCC into opj_decompress application (thanks winfried).
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/jp2/opj_decompress.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c index 0c65d852..b2e4e83c 100644 --- a/src/bin/jp2/opj_decompress.c +++ b/src/bin/jp2/opj_decompress.c @@ -850,6 +850,13 @@ int main(int argc, char **argv) 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 ) + image->color_space = OPJ_CLRSPC_SYCC; + else if (image->numcomps <= 2) + image->color_space = OPJ_CLRSPC_GRAY; if(image->icc_profile_buf) { #if defined(OPJ_HAVE_LIBLCMS1) || defined(OPJ_HAVE_LIBLCMS2) |
