I am having some resizing issues. I want the user to take a photo but I want it to resize to a smaller size (320, 480 or full size on the iphone). The mainImageView is set to 320,480 with mode scale to fill. I’ve tried aspect fit to but it didn’t seem to fix it still. Here is the code.
- (void)imagePickerController:(UIImagePickerController *) Picker
didFinishPickingMediaWithInfo:(NSDictionary *)info {
UIImage *originalImage = [info objectForKey:UIImagePickerControllerOriginalImage];
UIImage *resizedImage;
CGSize newSize = CGSizeMake(320.0, 480.0);
resizedImage = [original imageScaledToFitSize:newSize]; // uses MGImageResizeScale
mainImageView.image = newImage;
}
The issue is that it is scaled incorrectly (i.e. checkerboard image is rectangle after transform and not square).
I believe photos taken aren’t the same aspect ratio of the device’s screen. That might be causing your issue. Look up the original aspect ratio of the photos taken and confirm that they are 1.3:1, which is what you are resizing them to.