在ios中,使用ALAsset,如何提前获取ALAsset aspectRatioThumbnail大小(高度和宽度)(而无需将图像加载到某些UIImageview中)。我知道我可以使用Dimensions属性获取完整图像的大小,但是如何为aspectRatioThumbnail做呢?

最佳答案

您应该使用CGImageGetHeightCGImageGetWidth方法来获取aspectRatioThumbnail大小,例如:

 size_t height = CGImageGetHeight([asset aspectRatioThumbnail]);
 size_t width = CGImageGetWidth([asset aspectRatioThumbnail]);


更多信息可用here

10-05 20:03