title: UIImagePickerController editing allowed locks UIImage to max size of 320x320
body: <p>Update:</p>
  
  <p>With iPhone OS 3.0+, the whole UIImagePickerController API has changed. This question and answer should be considered 2.2. legacy code.</p>
  
  <hr>
  
  <p>When using the UIImagePickerController and you allow editing of the image.  The iPhone allows the user to resize and pan the image.  However, the max size of an edited image is capped at 320x320.  </p>
  
  <p>As an example, I took an iPhone screenshot and placed it in the photo library, which is a 480x320 png.  When I use a UIImagePickerController to select that image, even if I do NOT scale or pan the image, it is cropped to 320x320 before it is returned from the UIImagePickerController.  However, if I turn editing off, the image is returned the proper 480x320 size.</p>
  
  <p>My theory:
  Very subtly, the iPhone displays 2 nonstandard translucent tool bars that overlay over the image. These toolbars leave an innocuous 320x320 "window" over the photo.  It appears to me that this window effectively clips the underlying photo.</p>
  
  <p>Note:
  The callback also returns an editing dictionary with the original image and the clipping rect, but of course the rect is also max 320x320.</p>
  
  <p>Any ideas on how to allow images larger than 320x320 to be scaled and panned?</p>
  
  <p>Some code:</p>
  
  <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)img editingInfo:(NSDictionary *)editInfo {
  
          self.myImageView.userInteractionEnabled=YES;
          CGRect imageFrame = myImageView.frame;
          CGPoint imageCenter = myImageView.center;
          imageFrame.size = img.size;
          myImageView.frame = imageFrame;
          self.myImageView.image = img;
          myImageView.center = imageCenter;
  
          [self dismissModalViewControllerAnimated:YES];
          [self performSelector:@selector(hideToolBars) withObject:nil afterDelay:2.0];
      }
  </code></pre>