Skip to content
Permalink
Browse files

...

  • Loading branch information...
Cristy
Cristy committed May 21, 2017
1 parent 4107887 commit acee073df34aa4d491bf5cb74d3a15fc80f0a3aa
Showing with 5 additions and 1 deletion.
  1. +5 −1 coders/jp2.c
@@ -388,7 +388,11 @@ static Image *ReadJP2Image(const ImageInfo *image_info,ExceptionInfo *exception)
opj_stream_destroy(jp2_stream);
for (i=0; i < (ssize_t) jp2_image->numcomps; i++)
{
if ((jp2_image->comps[i].dx == 0) || (jp2_image->comps[i].dy == 0))
if ((jp2_image->comps[0].dx == 0) || (jp2_image->comps[0].dy == 0) ||
(jp2_image->comps[0].dx != jp2_image->comps[i].dx) ||
(jp2_image->comps[0].dy != jp2_image->comps[i].dy) ||
(jp2_image->comps[0].prec != jp2_image->comps[i].prec) ||
(jp2_image->comps[0].sgnd != jp2_image->comps[i].sgnd))
{
opj_destroy_codec(jp2_codec);
opj_image_destroy(jp2_image);

0 comments on commit acee073

Please sign in to comment.
You can’t perform that action at this time.