I am having file with extension .RGB and need to display it on uiimageview.
For this i need to convert the .RGB format to specific format like .PNG or .JPEG however unable to get it right . I tried with following code for this.
UIImage *image=[UIImage imageNamed:@"Attachment.RGB"];
CGImageRef imageRef=[image CGImage];
UIImage *myImage = [UIImage imageWithCGImage:imageRef];
NSData *pngData = UIImagePNGRepresentation(myImage);
UIImage* imageFinal = [UIImage imageWithData:pngData];
image_view.image=imageFinal;
There are online websites which can convert the RGB to visible image .But i didn't found any solution for objective c . Can any one help me on this .
Regards Pagyyy123