UIImagePickerControllerSourceTypePhotoLibrary
から画像を取得する前に、画像ライブラリから画像を選択する前に、その特定の画像のメモリサイズを知りたいと思います。私はここで私は計算しています画像サイズが画像ライブラリ内の画像サイズが、私が計算してる画像サイズと異なっているまさに、誤っているイメージのサイズを取得する方法UIImageピッカーコントローラでそれを選択する前に?
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage * img = [info objectForKey:@"UIImagePickerControllerEditedImage"];
size_t imageSize = CGImageGetBytesPerRow(img.CGImage) * CGImageGetHeight(img.CGImage);
printf("\n the image size is :%zd",imageSize);
[self useImage:img];
[[picker parentViewController] dismissModalViewControllerAnimated:NO];
UINavigationController* navController = self.navigationController;
UIViewController* controller = [navController.viewControllers objectAtIndex:0];
[controller dismissModalViewControllerAnimated:NO];
}
を使用しています。 と私はヨは、このようにJPEG形式で撮像した画像のサイズを取得することができ、事前
私の答えを試しましたか? –