image->columns=(size_t) jp2_image->comps[0].w;
image->rows=(size_t) jp2_image->comps[0].h;
image->depth=jp2_image->comps[0].prec;
- status=SetImageExtent(image,image->columns,image->rows,exception);
- if (status == MagickFalse)
- return(DestroyImageList(image));
image->compression=JPEG2000Compression;
if (jp2_image->numcomps == 1)
SetImageColorspace(image,GRAYColorspace,exception);
opj_image_destroy(jp2_image);
return(GetFirstImageInList(image));
}
+ status=SetImageExtent(image,image->columns,image->rows,exception);
+ if (status == MagickFalse)
+ {
+ opj_destroy_codec(jp2_codec);
+ opj_image_destroy(jp2_image);
+ return(DestroyImageList(image));
+ }
for (y=0; y < (ssize_t) image->rows; y++)
{
register Quantum