Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在构建一个基于相机的应用程序。在这个应用程序中,我可以在捕获按钮旁边显示最新捕获的图像缩略图。现在如何对视频缩略图执行相同的操作,我的意思是如何在相机 ios 中的捕获按钮旁边显示最新捕获的视频缩略图。提前致谢。
假设您正在使用枚举块枚举资产 - 对于您正在枚举的资产,请检查ALAssetPropertyType枚举块中的属性键,如下所示:
ALAssetPropertyType
if([asset valueForProperty: ALAssetPropertyType] == ALAssetTypeVideo){ CGImageRef thumbnailVidoeImageRef = [asset thumbnail]; // Do what you want with this CGImageRef. Convert to UIImage etc. }