从相机胶卷创建 UIImages 数组
我想从相机胶卷中获取所有图像并从中创建 UIImage 数组。
我已经尝试弄清楚如何做到这一点大约一天了,但我一无所获。我似乎不知道如何从相机胶卷中仅检索项目。看来我见过的所有样本都枚举了所有相册。不过我可能是错的。
任何帮助将不胜感激。谢谢!
I would like to get all of the images from the camera roll and create an array of UIImages from them.
I have been trying to figure out how to do this for about a day now and I've gotten nowhere. I can't seem to figure out how to retrieve only items from the Camera Roll. It appears that all of the samples that I've seen all enumerate over all of the photo albums. I might be wrong about that though.
Any help would be appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您尝试过 ALAssetsLibrary 吗?就像这样:
那就抓住他们了。然后执行此操作来渲染它们(这是邪恶的黑客行为。您需要根据需要导入它们,而不是像这样一次性导入它们,否则您将遇到内存问题并崩溃)
Have you tried ALAssetsLibrary? like this:
that'll nab them. then do this to render them (this is wicked hacky. you'll want to import them as needed and not all at once like this, or you'll run into memory issues and crash)