我正在开发iphone视频应用程序,因为我想在用户录制视频本身时获取磁盘占用的字节数。
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info;
用户完成挑选后调用此方法。有任何方法
答案 0 :(得分:0)
UIImage *img = [UIImage imageNamed:@"sample.png"];
NSData *imgData = UIImageJPEGRepresentation(img, 0);
NSLog(@"Size of Image(bytes):%d",[imgData length]);
答案 1 :(得分:-2)
NSData *data = [info objectForKey: UIImagePickerControllerMediaMetadata];