Use the below code for cutting UIImage in high quality without blur (not screenshot)
tmp is image view
<p>UIGraphicsBeginImageContextWithOptions(tmp.frame.size,YES, 4.0);</p>
<p>CGContextRef c = UIGraphicsGetCurrentContext();</p>
<p>CGContextConcatCTM(c, CGAffineTransformMakeTranslation(-tmp.frame.origin.x, -tmp.frame.origin.y));</p>
<p>[view.layer renderInContext:UIGraphicsGetCurrentContext()];</p>
<p>UIImage * img = UIGraphicsGetImageFromCurrentImageContext();</p>
<p>UIGraphicsEndImageContext();</p>
img will be the high quality image with no blur.
0 Comment(s)