uikit - iOS: writing a CGImageRef disk in png or jpeg -
what best way save cgimageref png or jpeg file in ios?
for general cocoa application (not using uikit), see: saving cgimageref png file? seems long , clunky.
using uikit, code becomes simple 3-liner:
uiimage *uiimage = [uiimage imagewithcgimage:cgimage]; nsdata *jpgdata = uiimagejpegrepresentation(uiimage, 0.9f); [jpgdata writetofile:path atomically:no];
ios uikit
No comments:
Post a Comment