Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/image_picker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.1+5

* Fix aspect ratio inversion on images that was rotated side ways(Left, Right, etc.).

## 0.6.1+4

* Android: Fix a regression where the `retrieveLostImage` does not work anymore.
Expand Down
9 changes: 8 additions & 1 deletion packages/image_picker/ios/Classes/FLTImagePickerImageUtil.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,17 @@ + (UIImage *)scaledImage:(UIImage *)image
}
}
}

// Scaling the image always rotate itself based on the current imageOrientation of the original
// Image. Set to orientationUp for the orignal image before scaling, so the scaled image doesn't
// mess up with the pixels.
if (image.imageOrientation == UIImageOrientationRight ||
image.imageOrientation == UIImageOrientationLeft ||
image.imageOrientation == UIImageOrientationLeftMirrored ||
image.imageOrientation == UIImageOrientationRightMirrored) {
double heightCopy = height;
height = width;
width = heightCopy;
}
UIImage *imageToScale = [UIImage imageWithCGImage:image.CGImage
scale:1
orientation:UIImageOrientationUp];
Expand Down
2 changes: 1 addition & 1 deletion packages/image_picker/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors:
- Flutter Team <[email protected]>
- Rhodes Davis Jr. <[email protected]>
homepage: https://github.com/flutter/plugins/tree/master/packages/image_picker
version: 0.6.1+4
version: 0.6.1+5

flutter:
plugin:
Expand Down