Ignore:
Timestamp:
03/13/12 09:01:27 (14 months ago)
Author:
cristy
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ImageMagick/trunk/MagickCore/channel.c

    r7096 r7100  
    242242  GetMagickToken(p,&p,token); 
    243243  channel_op=ExtractChannelOp; 
    244   for (channels=0; *p != '\0'; ) 
     244  for (channels=0; *token != '\0'; ) 
    245245  { 
    246246    ssize_t 
     
    268268          *canvas; 
    269269 
     270        if ((channel_op == ExtractChannelOp) && (channels == 1)) 
     271          { 
     272            destination_image->colorspace=GRAYColorspace; 
     273            InitializePixelChannelMap(destination_image); 
     274          } 
    270275        status=SetImageStorageClass(destination_image,DirectClass,exception); 
    271276        if (status == MagickFalse) 
     
    273278            destination_image=DestroyImageList(destination_image); 
    274279            return(destination_image); 
    275           } 
    276         if ((channel_op == ExtractChannelOp) && (channels == 1)) 
    277           { 
    278             destination_image->colorspace=GRAYColorspace; 
    279             InitializePixelChannelMap(destination_image); 
    280280          } 
    281281        canvas=CloneImage(source_image,0,0,MagickTrue,exception); 
     
    371371      break; 
    372372  } 
     373  if ((channel_op == ExtractChannelOp) && (channels == 1)) 
     374    { 
     375      destination_image->colorspace=GRAYColorspace; 
     376      InitializePixelChannelMap(destination_image); 
     377    } 
    373378  status=SetImageStorageClass(destination_image,DirectClass,exception); 
    374379  if (status == MagickFalse) 
     
    377382      return((Image *) NULL); 
    378383    } 
    379   if ((channel_op == ExtractChannelOp) && (channels == 1)) 
    380     { 
    381       destination_image->colorspace=GRAYColorspace; 
    382       InitializePixelChannelMap(destination_image); 
    383     } 
    384   return(destination_image); 
     384  return(GetFirstImageInList(destination_image)); 
    385385} 
    386386 
Note: See TracChangeset for help on using the changeset viewer.