Fixes 1st image crash of #704
Prevents color_esycc_to_rgb to be applied when different subsampling are used.
This commit is contained in:
parent
c559c62853
commit
d26481f24b
|
@ -745,6 +745,19 @@ void color_esycc_to_rgb(opj_image_t *image)
|
||||||
int max_value = (1 << image->comps[0].prec) - 1;
|
int max_value = (1 << image->comps[0].prec) - 1;
|
||||||
|
|
||||||
if(image->numcomps < 3) return;
|
if(image->numcomps < 3) return;
|
||||||
|
if((image->comps[0].dx == image->comps[1].dx)
|
||||||
|
&& (image->comps[1].dx == image->comps[2].dx)
|
||||||
|
&& (image->comps[0].dy == image->comps[1].dy)
|
||||||
|
&& (image->comps[1].dy == image->comps[2].dy))/* same sub-sampling */
|
||||||
|
{
|
||||||
|
// go on
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf(stderr,"%s:%d:color_esycc_to_rgb\n\tCAN NOT CONVERT\n", __FILE__,__LINE__);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
w = image->comps[0].w;
|
w = image->comps[0].w;
|
||||||
h = image->comps[0].h;
|
h = image->comps[0].h;
|
||||||
|
|
Loading…
Reference in New Issue