title: Save img with UIImagePickerController
body: <p>I am using UIImagePickerController for bring images from the photo library,</p>
  
  <p>i found this method for saving the uiimage as png or jpeg:</p>
  
  <pre><code>- (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
  {
      UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
  
      // Create paths to output images
      NSString  *pngPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Test.png"];
      NSString  *jpgPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Test.jpg"];
  
      // Write a UIImage to JPEG with minimum compression (best quality)
      // The value 'image' must be a UIImage object
      // The value '1.0' represents image compression quality as value from 0.0 to 1.0
      [UIImageJPEGRepresentation(image, 1.0) writeToFile:jpgPath atomically:YES];
  
      // Write image to PNG
      [UIImagePNGRepresentation(&lt;#UIImage *image#&gt;) writeToFile:jpgPath atomically:YES];
  
      // Let's check to see if files were successfully written...
  
      // Create file manager
      NSError *error;
      NSFileManager *fileMgr = [NSFileManager defaultManager];
  
      // Point to Document directory
      NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
  
      // Write out the contents of home directory to console
      NSLog(@"Documents directory: %@", [fileMgr contentsOfDirectoryAtPath:documentsDirectory error:&amp;error]);
  
      [picker release];
  }
  </code></pre>
  
  <p>the problem is that the file in png is 6.4 mb and in jpeg 3.2 mb, there is a way for saving the image file in smaller size then this?</p>