【问题标题】:iphone, when saving image with "renderInContext" to device, the image is blurry?iphone,将带有“renderInContext”的图像保存到设备时,图像模糊?
【发布时间】:2012-06-27 11:50:11
【问题描述】:

我正在使用此代码从视图中呈现图像。 然后我将它保存到相册。 图像模糊? 为什么?有解决办法吗?

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

全部发送。

【问题讨论】:

    标签: iphone save photolibrary blurry


    【解决方案1】:

    您可能正在使用视网膜设备, 更改以下内容

    UIGraphicsBeginImageContext(self.view.bounds.size)
    

    UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, self.view.opaque, 0.0);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-28
      • 2020-01-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多