Question: Is there a free tool to open and recompile a swf file that contains action script 3 code?

Answer: 
```
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];

// png image data

NSData *pngData = UIImagePNGRepresentation(image);

// jpeg image data

NSData *jpegData = UIImageJPEGRepresentation(image, compressionQuality);  // compressionQuality = 0.0 to 1.0 --> 0 means maximum compression and 1 means minimum compression

```

Once you get NSData, you can save this data to specific file. For more details go through this [link](http://developer.apple.com/library/ios/#documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html)

Hope this will help you.
You could use something similar to this in your method to save the captured object as a PNG:

```
// Create paths to output images
NSString  *thePngPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Example.png"];
NSString  *theJpgPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Example.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:theJpgPath atomically:YES];

// Write image to PNG
[UIImagePNGRepresentation(image) writeToFile:thePngPath atomically:YES];

```