diff --git a/AUTHORS b/AUTHORS index 7681fae6fae0..8f12da27bafa 100644 --- a/AUTHORS +++ b/AUTHORS @@ -19,3 +19,4 @@ Simon Lightfoot Ashton Thomas Thomas Danner Diego Velásquez +Hajime Nakamura diff --git a/packages/image_picker/CHANGELOG.md b/packages/image_picker/CHANGELOG.md index 7c5d0b020b3a..bde645a956b6 100644 --- a/packages/image_picker/CHANGELOG.md +++ b/packages/image_picker/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.9 + +* Bugfix: on iOS prevent to appear one pixel white line on resized image. + ## 0.4.8 * Replace the full `com.android.support:appcompat-v7` dependency with `com.android.support:support-core-utils`, which results in smaller APK sizes. diff --git a/packages/image_picker/ios/Classes/ImagePickerPlugin.m b/packages/image_picker/ios/Classes/ImagePickerPlugin.m index 8ddf86c5d5a9..10185776be39 100644 --- a/packages/image_picker/ios/Classes/ImagePickerPlugin.m +++ b/packages/image_picker/ios/Classes/ImagePickerPlugin.m @@ -216,8 +216,8 @@ - (UIImage *)scaledImage:(UIImage *)image bool shouldDownscale = shouldDownscaleWidth || shouldDownscaleHeight; if (shouldDownscale) { - double downscaledWidth = (height / originalHeight) * originalWidth; - double downscaledHeight = (width / originalWidth) * originalHeight; + double downscaledWidth = floor((height / originalHeight) * originalWidth); + double downscaledHeight = floor((width / originalWidth) * originalHeight); if (width < height) { if (!hasMaxWidth) { diff --git a/packages/image_picker/pubspec.yaml b/packages/image_picker/pubspec.yaml index b311fca237e9..edfc6dc2c3b6 100755 --- a/packages/image_picker/pubspec.yaml +++ b/packages/image_picker/pubspec.yaml @@ -5,7 +5,7 @@ authors: - Flutter Team - Rhodes Davis Jr. homepage: https://github.com/flutter/plugins/tree/master/packages/image_picker -version: 0.4.8 +version: 0.4.9 flutter: plugin: