ios - UIView screenshot with magnificationFilter -
i have tiny qrcode uiimage set big uiimageview. in order avoid gradient black white when amplifying, setted uiimageview magnification filter kcafilternearest shown below (it works):
[qrcodeimageview layer].magnificationfilter = kcafilternearest;
now need take screenshot imageview, result image ignoring magnification filter:
here screenshot code:
uigraphicsbeginimagecontextwithoptions(cgsizemake(qrcodeimageview.frame.size.width, qrcodeimageview.frame.size.height),yes, 2.0f); cgcontextref context = uigraphicsgetcurrentcontext(); [qrcodeimageview.layer renderincontext:context]; uiimage *capturedimage = uigraphicsgetimagefromcurrentimagecontext(); uigraphicsendimagecontext();
so, question is, how render in context given magnification filter?
thanks in advance
ios
No comments:
Post a Comment