i able draw on uiview
e.g. drawscreen
-(void)touchesbegan:(nsset *)touches withevent:(uievent *)event -(void)touchesmoved:(nsset *)touches withevent:(uievent *)event -(void)touchesended:(nsset *)touches withevent:(uievent *)event
i have added uiimageview
subview of above uiview
e.g. drawscreen
looks drawing on image.
now want save image drawing, have done part using
uigraphicsbeginimagecontext(cgsizemake(drawscreen.frame.size.width, drawscreen.frame.size.height));
problem:
problem resulted save image of size drawscreen
, original image of quality. e.g,
size of drawscreen
300x300
the size of original image 640x640
the size of resulted image 300x300.
how can save original size image editing?
start replacing drawscreen.frame.size.width
, drawscreen.frame.size.height
size of original image.
first of all, need create new uiview
instance size of image (and add image it). need scale , redraw art it. depending on how storing image, either need multiply coordinates calculated factor, or render , enlarge it. either way, add enlarged graphics subview on top of new uiview
. use uigraphicsgetcurrentimagecontext
.
you want read this documentation.
also, may find this question helpful.
Comments
Post a Comment