title: PhoneGap screenshot plugin: get image file path and/or Uri
body: <p>I am using PhoneGap along with the associated Screenshot Plugin for iOS. It is trivial to take a screenshot that is saved to the "Saved Photos" on the phone/simulator. But I would like to be able to take the screenshot, then do something with the saved image, specifically send it to a server. </p>
  
  <p>It seems that the <code>UIImageWriteToSavedPhotosAlbum</code> function used in the plugin does not return anything helpful so I am at a loss of how I can modify the plugin to return me the image path to be used in the FileUploader plugin.</p>
  
  <p>The relevant plugin code below ...</p>
  
  <pre><code>- (void)saveScreenshot:(NSArray*)arguments withDict:(NSDictionary*)options
  {
  CGRect screenRect = [[UIScreen mainScreen] bounds];
  CGRect imageRect = CGRectMake(0, 0, CGRectGetWidth(screenRect), CGRectGetHeight(screenRect));
  UIGraphicsBeginImageContext(imageRect.size);
  
  CGContextRef ctx = UIGraphicsGetCurrentContext();
  [[UIColor blackColor] set];
  CGContextTranslateCTM(ctx, 0, 0);
  CGContextFillRect(ctx, imageRect);
  
  [webView.layer renderInContext:ctx];
  
  UIImage *image1 = UIGraphicsGetImageFromCurrentImageContext();
  UIImageWriteToSavedPhotosAlbum(image1, nil, nil, nil);
  UIGraphicsEndImageContext();
  UIAlertView *alert= [[UIAlertView alloc] initWithTitle:nil message:@"Image Saved" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
  [alert show];
  [alert release];
  }
  </code></pre>