开发者

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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜