--- ImageMagick-6.1.3/coders/jp2.c_orig 2004-11-10 14:52:21.000000000 +0100 +++ ImageMagick-6.1.3/coders/jp2.c 2004-11-11 10:57:06.000000000 +0100 @@ -338,12 +338,9 @@ { case JAS_CLRSPC_FAM_RGB: { - components[0]=jas_image_getcmptbytype(jp2_image, - JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R)); - components[1]=jas_image_getcmptbytype(jp2_image, - JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G)); - components[2]=jas_image_getcmptbytype(jp2_image, - JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B)); + 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); if ((components[0] < 0) || (components[1] < 0) || (components[2] < 0)) { (void) jas_stream_close(jp2_stream); @@ -351,8 +348,7 @@ ThrowReaderException(CorruptImageError,"MissingImageChannel"); } number_components=3; - components[3]=jas_image_getcmptbytype(jp2_image, - JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_OPACITY)); + components[3]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_OPACITY); if (components[3] > 0) { image->matte=MagickTrue; @@ -362,8 +358,7 @@ } case JAS_CLRSPC_FAM_GRAY: { - components[0]=jas_image_getcmptbytype(jp2_image, - JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y)); + components[0]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_GRAY_Y); if (components[0] < 0) { (void) jas_stream_close(jp2_stream); @@ -375,12 +370,9 @@ } case JAS_CLRSPC_FAM_YCBCR: { - components[0]=jas_image_getcmptbytype(jp2_image, - JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_Y)); - components[1]=jas_image_getcmptbytype(jp2_image, - JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CB)); - components[2]=jas_image_getcmptbytype(jp2_image, - JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CR)); + 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); if ((components[0] < 0) || (components[1] < 0) || (components[2] < 0)) { (void) jas_stream_close(jp2_stream); @@ -388,8 +380,7 @@ ThrowReaderException(CorruptImageError,"MissingImageChannel"); } number_components=3; - components[3]=jas_image_getcmptbytype(jp2_image, - JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_OPACITY)); + components[3]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_OPACITY); if (components[3] > 0) { image->matte=MagickTrue;