Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Prev Previous commit
Next Next commit
fix format
  • Loading branch information
owops committed Oct 15, 2019
commit 1783c2994ed1b439ce8ab4604cc89b23d37ba8bc
10 changes: 5 additions & 5 deletions packages/image_picker/ios/Classes/FLTImagePickerImageUtil.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ + (UIImage *)scaledImage:(UIImage *)image
scale:1
orientation:UIImageOrientationUp];

// The image orientation is manually set to UIImageOrientationUp which swapped the aspect ratio in some scenarios.
// For example, when the original image has orientation left, the horizontal pixels
// should be scaled to `width` and the vertical pixels should be scaled to `height`. After setting the orientation
// to up, we end up scaling the horizontal pixels to `height` and vertical to `width`.
// Below swap will solve this issue.
// The image orientation is manually set to UIImageOrientationUp which swapped the aspect ratio in
// some scenarios. For example, when the original image has orientation left, the horizontal
// pixels should be scaled to `width` and the vertical pixels should be scaled to `height`. After
// setting the orientation to up, we end up scaling the horizontal pixels to `height` and vertical
// to `width`. Below swap will solve this issue.
if ([image imageOrientation] == UIImageOrientationLeft ||
[image imageOrientation] == UIImageOrientationRight ||
[image imageOrientation] == UIImageOrientationLeftMirrored ||
Expand Down