开发者

Get bytes from UIImage

I have a UIImage object, but I need to access the bytes of the image. I don't see any method in the class reference to do this, such as getBytes, etc.

This is coming back from a UIImagePicker, 开发者_运维问答so I do not have a file path, just an instance of UIImage that contains the original image.


UIImageJPEGRepresentation or UIImagePNGRepresentation will return NSData*'s that you can use to get the raw data

See docs here

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜