When I take the picture on camera, I'd like to get file size of UIImage.
-(void)imagePickerController:(UIImagePickerController*)imagePicker didFinishPickingMediaWithInfo:(NSDictionary*)info {
UIImage *originalimage = [info objectForKey:UIImagePickerControllerOriginalImage];
NSData *dataForPNGFile = UIImagePNGRepresentation(originalimage);
int fileLengthPNG = dataForPNGFile.length;
NSLog(@"-->> fileSizePNG : [%i]", fileLengthPNG);
}
I wrote this code but the system console returned "fileSizePNG : [10550292]".
I think 10550292 bytes is too big.
It is about 10MB so I thought my code is mistake.
If you find any problems, could you please let to me?