【发布时间】:2013-08-03 07:07:32
【问题描述】:
我目前正在使用 UIGraphicsGetImageFromCurrentImageContext() 将内容的图像保存到用户的相机胶卷,但图像质量比我在模拟器中截屏时差。有什么办法可以改善吗?无论如何保存的图像是什么格式?骨肉瘤?有什么办法可以改变吗?
这是我的存档代码:
CGSize size = [content bounds].size;
UIGraphicsBeginImageContext(size);
[[content layer] renderInContext:UIGraphicsGetCurrentContext()];
UIImage *originalImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(originalImage, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
【问题讨论】:
-
你的“
size”有多大?如果它不是真的那么大,那么你的分辨率会很差。 -
屏幕大小差不多。我没有在其他地方查看保存的图像。我把它保存在模拟器上,然后去了模拟器的相机胶卷,它看起来比在应用中差很多。
标签: ios objective-c core-graphics