Iphone, when saving an image using "renderInContext" on the device, the image is blurry?

I use this code to render an image from a view. Then I save it in the photo album. Is the image blurry? What for? Is there a solution?

UIGraphicsBeginImageContext(self.view.bounds.size); [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); 

Tnx all.

+8
iphone save blurry
source share
1 answer

You can use the retina device, change the following

 UIGraphicsBeginImageContext(self.view.bounds.size) 

to

 UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, self.view.opaque, 0.0); 
+20
source share

All Articles