Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你好 demo 里不能拿到图片的名字和地址 #6

Closed
kmheike opened this issue Oct 22, 2018 · 1 comment
Closed

你好 demo 里不能拿到图片的名字和地址 #6

kmheike opened this issue Oct 22, 2018 · 1 comment

Comments

@kmheike
Copy link

kmheike commented Oct 22, 2018

你好 demo 里不能拿到图片的名字和地址我想转成 base64的 func getdata(model: PhotoImageModel) {
这个 方法就不会走方便看看吗

@apptut
Copy link
Owner

apptut commented Oct 24, 2018

嗨,不是太明白你的意思,我大概重复一下你的问题,你想表达的是:“”想获取图片路径目的使用来获取图片的base64格式内容?“

如果是这个问题,我的回答是:我这个demo封装的PhotoImageModel对象下,data是PHAsset类型,你可以使用PHImageManager的相关方法从PHAsset中获取图片原路径,也可以从PHAsset中直接获取原图片内容直接转为Base64格式,详细可参考PHImageManager使用方法。

可参考这篇如下两个链接:

@apptut apptut closed this as completed Oct 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants