[trunk] fixed a bug preventing palette image with cdef to decode properly using opj_get_decoded_tile (fixes issue 428)
This commit is contained in:
parent
c3629e37a2
commit
f123ce8f8a
|
@ -2704,11 +2704,6 @@ OPJ_BOOL opj_jp2_get_tile( opj_jp2_t *p_jp2,
|
||||||
else
|
else
|
||||||
p_image->color_space = OPJ_CLRSPC_UNKNOWN;
|
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) {
|
if(p_jp2->color.jp2_pclr) {
|
||||||
/* Part 1, I.5.3.4: Either both or none : */
|
/* Part 1, I.5.3.4: Either both or none : */
|
||||||
if( !p_jp2->color.jp2_pclr->cmap)
|
if( !p_jp2->color.jp2_pclr->cmap)
|
||||||
|
@ -2717,6 +2712,11 @@ OPJ_BOOL opj_jp2_get_tile( opj_jp2_t *p_jp2,
|
||||||
opj_jp2_apply_pclr(p_image, &(p_jp2->color));
|
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) {
|
if(p_jp2->color.icc_profile_buf) {
|
||||||
p_image->icc_profile_buf = p_jp2->color.icc_profile_buf;
|
p_image->icc_profile_buf = p_jp2->color.icc_profile_buf;
|
||||||
p_image->icc_profile_len = p_jp2->color.icc_profile_len;
|
p_image->icc_profile_len = p_jp2->color.icc_profile_len;
|
||||||
|
|
Loading…
Reference in New Issue