summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMatthieu Darbois <mayeut@users.noreply.github.com>2014-11-17 21:46:43 +0000
committerMatthieu Darbois <mayeut@users.noreply.github.com>2014-11-17 21:46:43 +0000
commitf123ce8f8abe06453fb72cfe749a1865750d55b3 (patch)
tree6533d77f0bbc6e4922921e3f1bea6490601fe6c1 /src/lib
parentc3629e37a206ec8a60da6c00dbc04bf4a28b2868 (diff)
[trunk] fixed a bug preventing palette image with cdef to decode properly using opj_get_decoded_tile (fixes issue 428)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/openjp2/jp2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/openjp2/jp2.c b/src/lib/openjp2/jp2.c
index 219278fe..c4d800bb 100644
--- a/src/lib/openjp2/jp2.c
+++ b/src/lib/openjp2/jp2.c
@@ -2704,11 +2704,6 @@ OPJ_BOOL opj_jp2_get_tile( opj_jp2_t *p_jp2,
else
p_image->color_space = OPJ_CLRSPC_UNKNOWN;
- /* Apply the color space if needed */
- if(p_jp2->color.jp2_cdef) {
- opj_jp2_apply_cdef(p_image, &(p_jp2->color));
- }
-
if(p_jp2->color.jp2_pclr) {
/* Part 1, I.5.3.4: Either both or none : */
if( !p_jp2->color.jp2_pclr->cmap)
@@ -2716,6 +2711,11 @@ OPJ_BOOL opj_jp2_get_tile( opj_jp2_t *p_jp2,
else
opj_jp2_apply_pclr(p_image, &(p_jp2->color));
}
+
+ /* Apply the color space if needed */
+ if(p_jp2->color.jp2_cdef) {
+ opj_jp2_apply_cdef(p_image, &(p_jp2->color));
+ }
if(p_jp2->color.icc_profile_buf) {
p_image->icc_profile_buf = p_jp2->color.icc_profile_buf;