UIImage UIImageJPEGRepresentation safe to UIImage
I need to perform UIImageJPEGRepresentation method and after that save it NOT to file, I 开发者_如何学Goneed to save it to UIImage. Help please..
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.
Eh? UIImageJPEGRepresentation
converts an image to JPEG data...
精彩评论