Changeset 8044
- Timestamp:
- 05/24/12 14:14:16 (12 months ago)
- File:
-
- 1 edited
-
ImageMagick/trunk/coders/jp2.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ImageMagick/trunk/coders/jp2.c
r7884 r8044 403 403 ThrowReaderException(DelegateError,"UnableToDecodeImageFile"); 404 404 } 405 image->columns=jas_image_width(jp2_image); 406 image->rows=jas_image_height(jp2_image); 407 image->compression=JPEG2000Compression; 405 408 switch (jas_clrspc_fam(jas_image_clrspc(jp2_image))) 406 409 { 407 410 case JAS_CLRSPC_FAM_RGB: 408 411 { 412 SetImageColorspace(image,RGBColorspace,exception); 409 413 components[0]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_RGB_R); 410 414 components[1]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_RGB_G); … … 427 431 case JAS_CLRSPC_FAM_GRAY: 428 432 { 433 SetImageColorspace(image,GRAYColorspace,exception); 429 434 components[0]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_GRAY_Y); 430 435 if (components[0] < 0) … … 439 444 case JAS_CLRSPC_FAM_YCBCR: 440 445 { 446 SetImageColorspace(image,YCbCrColorspace,exception); 441 447 components[0]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_YCBCR_Y); 442 448 components[1]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_YCBCR_CB); … … 455 461 number_components++; 456 462 } 457 SetImageColorspace(image,YCbCrColorspace,exception);458 463 break; 459 464 } … … 465 470 } 466 471 } 467 image->columns=jas_image_width(jp2_image);468 image->rows=jas_image_height(jp2_image);469 image->compression=JPEG2000Compression;470 if (number_components == 1)471 SetImageColorspace(image,GRAYColorspace,exception);472 472 for (i=0; i < (ssize_t) number_components; i++) 473 473 {
Note: See TracChangeset
for help on using the changeset viewer.
