(void) jas_stream_close(jp2_stream);
ThrowReaderException(DelegateError,"UnableToDecodeImageFile");
}
+ image->columns=jas_image_width(jp2_image);
+ image->rows=jas_image_height(jp2_image);
+ image->compression=JPEG2000Compression;
switch (jas_clrspc_fam(jas_image_clrspc(jp2_image)))
{
case JAS_CLRSPC_FAM_RGB:
{
+ SetImageColorspace(image,RGBColorspace,exception);
components[0]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_RGB_R);
components[1]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_RGB_G);
components[2]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_RGB_B);
}
case JAS_CLRSPC_FAM_GRAY:
{
+ SetImageColorspace(image,GRAYColorspace,exception);
components[0]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_GRAY_Y);
if (components[0] < 0)
{
}
case JAS_CLRSPC_FAM_YCBCR:
{
+ SetImageColorspace(image,YCbCrColorspace,exception);
components[0]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_YCBCR_Y);
components[1]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_YCBCR_CB);
components[2]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_YCBCR_CR);
image->matte=MagickTrue;
number_components++;
}
- SetImageColorspace(image,YCbCrColorspace,exception);
break;
}
default:
ThrowReaderException(CoderError,"ColorspaceModelIsNotSupported");
}
}
- image->columns=jas_image_width(jp2_image);
- image->rows=jas_image_height(jp2_image);
- image->compression=JPEG2000Compression;
- if (number_components == 1)
- SetImageColorspace(image,GRAYColorspace,exception);
for (i=0; i < (ssize_t) number_components; i++)
{
size_t