相册内文件不能直接获取data
- (NSData *)imageDataWithALAssert:(ALAsset *)result
{
ALAssetRepresentation *assetRep = [result defaultRepresentation];
NSUInteger size = [assetRep size];
uint8_t *buff = malloc(size);
NSError *err = nil;
NSUInteger gotByteCount = [assetRep getBytes:buff fromOffset:0 length:size error:&err];
DLog(@"写入字节总数: %d", gotByteCount);
return [NSData dataWithBytesNoCopy:buff length:size freeWhenDone:YES];
}