title: 'NSInvalidArgumentException', reason: '-[UIImage length]: unrecognized selector sent to instance 0x1d53b6b0'
body: <p>I have array of images on camera overlay. When i click button I need to take snapshot of one overlay image with camera view. But I got following error when I launch in device. I searched some existing code I can't get answer.</p>
  
  <p>Error:</p>
  
  <pre><code>[UIImage length]: unrecognized selector sent to instance 0x1d53b6b0 2013-04-02 11:27:18.748 
      ARimage[1166:907] *** Terminating app due to uncaught exception 
      'NSInvalidArgumentException', reason: '-[UIImage length]: unrecognized selector sent to instance 0x1d53b6b0'
  </code></pre>
  
  <p>code for overlay images of array:</p>
  
  <pre><code>    NSArray *arrayOfImageFiles=[[NSArray alloc]initWithObjects:[UIImage imageNamed:@"img1.png"],
  [UIImage imageNamed:@"img2.png"],
  [UIImage imageNamed:@"img3.png"],
  [UIImage imageNamed:@"img4.png"],
  [UIImage imageNamed:@"img5.png"], nil];//array of images.
  
       for(NSString * imageFileName in arrayOfImageFiles)//here you are getting string format but imageFileName is an image object
            {
      UIImage * overlay = [UIImage imageNamed: imageFileName];//here imageFileName is image simply give here  UIImage * overlay=imageFileName;
      if(overlay)
          {
  
         CGSize overlaySize = [overlay size];                                                                    
  
         [overlay drawInRect:CGRectMake(30 * xScaleFactor, 100 * yScaleFactor, overlaySize.width * xScaleFactor, overlaySize.height * yScaleFactor)];                                                                  
          } else {                                                                                                                                      
           NSLog( @"could not find an image named %@", imageFileName);   
  
             }
            }                                                             
          UIImage *combinedImage = UIGraphicsGetImageFromCurrentImageContext();                          
           [self setStillImage:combinedImage];                                                           
             UIGraphicsEndImageContext();                                                     
               [[NSNotificationCenter defaultCenter] postNotificationName:kImageCapturedSuccessfully object:nil];                                    
  
         }];                                                 
          }                          
  </code></pre>
  
  <p>Capture overlay image for button click:</p>
  
  <pre><code> - (void)ButtonPressed {
  
      [self captureStillImageWithOverlay:[NSArray arrayWithObjects:[UIImage imageNamed:@"img1.png"],
  [UIImage imageNamed:@"img2.png"],
  [UIImage imageNamed:@"img3.png"],
  [UIImage imageNamed:@"img4.png"],
  [UIImage imageNamed:@"img5.png"], nil]];                                                          
  
           }   
  </code></pre>
  
  <p>Images are displaying in the camera overlay view. When i click the button to capture overlay image i get error.                                                          </p>