The best way to find smooth edges and sharp images is to do this:
CGRect imageRect = CGRectMake(0, 0, self.photo.image.size.width, self.photo.image.size.height); UIGraphicsBeginImageContextWithOptions(imageRect.size, NO, 0.0); [self.photo.image drawInRect:CGRectMake(1, 1, self.photo.image.size.width - 2, self.photo.image.size.height - 2)]; self.photo.image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();
Adding the Info.plist key, as described in some cases, greatly affects performance, and if you use it, you basically apply it to everything, and not just to the one place where you need it.
Also, don't just use UIGraphicsBeginImageContext(imageRect.size); otherwise the layer will be blurred. You should use UIGraphicsBeginImageContextWithOptions , as I showed.
iwasrobbed Apr 25 '13 at 21:07 2013-04-25 21:07
source share