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.
Use this code,

```
NSData* pngdata = UIImagePNGRepresentation (image); //PNG wrap 
UIImage* img = [UIImage imageWithData:pngdata];
UIImageWriteToSavedPhotosAlbum(img, nil, nil, nil);

```