After getting the UIImage
you will have to convert it back into data with different format then you can get png and jpg or jpeg UIImage
.
NSData *data1 = UIImageJPEGRepresentation(image, 1.0); // 1.0 is for original you can compress it by passing the float b/w 0-1
NSData *data2 = UIImagePNGRepresentation(image);
UIImage *jpgImage = [UIImage imageWithData:data1];
UIImage *pngImage = [UIImage imageWithData:data2];
Or you can also write data
with image extensions in documents directory.
[data writeToFile:[directoryPath stringByAppendingPathComponent:@"image.jpeg"] atomically:YES];
// It will save this image as jpeg. But would not work for all formats.
Edit:
See this link How to convert .jpg image to .bmp format using Objective C?.