0
我有以下代码来保存图像,但它质量似乎很差...帮助保存图像
有没有什么办法让图像质量好?
感谢所有帮助
UIGraphicsBeginImageContext(CGSizeMake(self.view.bounds.size.width,
self.view.bounds.size.height-50));
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextTranslateCTM(context, 0, -50);
[self.view.layer renderInContext:context];
UIImage* viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSData* imageData = [NSData dataWithData:UIImageJPEGRepresentation(viewImage,0)];