访问图像路径 [英] Accessing Image Path
本文介绍了访问图像路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从iPhone设备获取Path的相册图像.而且我还需要使用该图像的名称作为扩展名.
I want to get the Path a image of the photo albums from the iPhone device. and also i need the extension of that image with their name.
推荐答案
I've not tried this, but take a look at UIImagePickerControllerDelegate and the didFinishPickingMediaWithInfo
method. I thought the actual path to the image was hidden, but the info
Dictionary has a key called UIImagePickerControllerReferenceURL
which looks like it might be a NSURL to the original image.
UIImagePickerControllerReferenceURL
The Assets Library URL for the original version of the picked item.
After the user edits a picked item—such as by cropping an image or trimming a movie—the URL continues to point to the original version of the picked item.
The value for this key is an NSURL object.
Available in iOS 4.1 and later.
Declared in UIImagePickerController.h
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
这篇关于访问图像路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文