Commit ae58a867 by Nam Nguyen - ナム

Avoid blurry result in resizing and cropping image

parent 19ab85bd
......@@ -43,7 +43,7 @@ public extension UIImage {
let g: UIImage?
let t: CGRect = CGRectMake(0, 0, w, h)
UIGraphicsBeginImageContext(t.size)
UIGraphicsBeginImageContextWithOptions(t.size, false, UIScreen.mainScreen().scale)
drawInRect(t, blendMode: .Normal, alpha: 1)
g = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment