Changeset 8044


Ignore:
Timestamp:
05/24/12 14:14:16 (12 months ago)
Author:
cristy
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ImageMagick/trunk/coders/jp2.c

    r7884 r8044  
    403403      ThrowReaderException(DelegateError,"UnableToDecodeImageFile"); 
    404404    } 
     405  image->columns=jas_image_width(jp2_image); 
     406  image->rows=jas_image_height(jp2_image); 
     407  image->compression=JPEG2000Compression; 
    405408  switch (jas_clrspc_fam(jas_image_clrspc(jp2_image))) 
    406409  { 
    407410    case JAS_CLRSPC_FAM_RGB: 
    408411    { 
     412      SetImageColorspace(image,RGBColorspace,exception); 
    409413      components[0]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_RGB_R); 
    410414      components[1]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_RGB_G); 
     
    427431    case JAS_CLRSPC_FAM_GRAY: 
    428432    { 
     433      SetImageColorspace(image,GRAYColorspace,exception); 
    429434      components[0]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_GRAY_Y); 
    430435      if (components[0] < 0) 
     
    439444    case JAS_CLRSPC_FAM_YCBCR: 
    440445    { 
     446      SetImageColorspace(image,YCbCrColorspace,exception); 
    441447      components[0]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_YCBCR_Y); 
    442448      components[1]=jas_image_getcmptbytype(jp2_image,JAS_IMAGE_CT_YCBCR_CB); 
     
    455461          number_components++; 
    456462        } 
    457       SetImageColorspace(image,YCbCrColorspace,exception); 
    458463      break; 
    459464    } 
     
    465470    } 
    466471  } 
    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); 
    472472  for (i=0; i < (ssize_t) number_components; i++) 
    473473  { 
Note: See TracChangeset for help on using the changeset viewer.