[英]Phonegap (cordova) save image to custom album
I do not know much about Objective-C
. 我对
Objective-C
不太了解。 I need to save the image in the gallery to custom name album and i used Canvas2ImagePlugin
but image save to album camera roll. 我需要将图库中的图像保存到自定义名称相册,并且我使用了
Canvas2ImagePlugin
但是将图像保存到相册相机胶卷。
Canvas2ImagePlugin
using: Canvas2ImagePlugin
使用:
UIImage* image = [[[UIImage alloc] initWithData:imageData] autorelease];
UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
How to use the name album in the function UIImageWriteToSavedPhotosAlbum
? 如何在函数
UIImageWriteToSavedPhotosAlbum
使用名称相册? Or use another function? 还是使用其他功能?
Actually i don't know about phonegap
. 其实我对
phonegap
。 but i can give you hint that how we can achieved in ios
. 但是我可以给您提示我们如何在
ios
实现。 with help of ALAssetsLibrary
, we can stored photo to custom album. 借助
ALAssetsLibrary
,我们可以将照片存储到自定义相册。
[self.library saveImage:image toAlbum:@"Touch Code Magazine" withCompletionBlock:^(NSError *error) {
if (error!=nil) {
NSLog(@"Big error: %@", [error description]);
}
}];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.