JNYJ

JNYJ - IOS - DEV

 

2011年4月11日

(iPhone)怎样从photo album中获取所有图片 “****TWO*****” ---》 获取所有图片从Photo Album?

摘要: ok 现在就简单一个方法就可以搞定 “获取所有图片从Photo Album”了。哈哈代码如下: 使用它“ALAssetsLibrary” 就ok了。+ (void) startGettingDataFromPhotoAlbum:(NSMutableArray *)arrayOfReceiveData ALAssetType:(NSString *)type{ // ALAssetsLibraryAccessFailureBlock failureblock = ^(NSError *myerror){ NSLog(@"cant get image -- %@",[myerr 阅读全文

posted @ 2011-04-11 18:03 JNYJ 阅读(1568) 评论(1) 推荐(1)

(iPhone)怎样从photo album中获取所有图片 “****ONE*****” ---》 怎样从CGImage 转换成 NSData?

摘要: 1:- (NSData *)imageData { ALAssetRepresentation *assetRep = [self.asset defaultRepresentation]; NSUInteger size = [assetRep size]; uint8_t *buff = malloc(size); NSError *err = nil; NSUInteger gotByteCount = [assetRep getBytes:buff fromOffset:0 length:size error:&err]; if (gotByteCount) { if (err 阅读全文

posted @ 2011-04-11 16:28 JNYJ 阅读(1496) 评论(0) 推荐(2)

导航