I need to perform UIImageJPEGRepresentation method and after that save it NOT to file, I need to save it to UIImage. Help please..
UIImage contains the data for an image. UIImageView is a custom view meant to display the UIImage .
For example: UIImage *img = [[UIImage alloc] init]; [img setImage:[UIImage imageNamed:@"anyImageName"]]; My UIImage object is declared in .
you can use this:
NSData *imageData = UIImageJPEGRepresentation(uiimageObject,1.0);
UIImage *imageObj = [UIImage imageWithData:imageData];
I have no idea why you are wanting to go from a UIImage to jpeg data and then right back to a UIImage, but [UIImage imageWithData:jpegdata]
should do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With