【问题标题】:ALAssetRepresentation fullResolutionImage's UIImageOrientation is wrongALAssetRepresentation fullResolutionImage 的 UIImageOrientation 错误
【发布时间】:2011-04-08 14:20:31
【问题描述】:

我正在尝试 ALAssetLibrary 以在照片应用程序中获取图片,但最近我发现了一个问题,当我从 ALAssetRepresentation 获取 CGImageRef 时,UIImageOrientation 是错误的(旋转 90 度),但是当我从CGImageRef,他们也错了,现在我怎样才能得到正确的 CGImageRef 或使用 CGImageRef 来创建正确的 UIImage?

【问题讨论】:

    标签: iphone cocoa-touch uiimage


    【解决方案1】:

    使用 UIImage 的 imageWithCGImage:scale:orientation: 方法。并传入 ALAsset 的 ALAssetPropertyOrientation 属性作为方向参数。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多