问题
i am developing iphone video app,in that i want to get bytes occupied in disk when user is recording the video itself .
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info;
this method is called after user is finished picking.is there any method
回答1:
UIImage *img = [UIImage imageNamed:@"sample.png"];
NSData *imgData = UIImageJPEGRepresentation(img, 0);
NSLog(@"Size of Image(bytes):%d",[imgData length]);
回答2:
NSData *data = [info objectForKey: UIImagePickerControllerMediaMetadata];
来源:https://stackoverflow.com/questions/22127288/how-to-receive-bytes-when-video-is-recording