fluttercandies / extended_image

A powerful official extension library of image, which support placeholder(loading)/ failed state, cache network, zoom pan image, photo view, slide out page, editor(crop,rotate,flip), paint custom etc.
https://fluttercandies.github.io/extended_image/
MIT License
1.93k stars 504 forks source link

[Bug report] CropAspectRatios.original height is full but width is 0, not original image's width #555

Open ramtinq opened 1 year ago

ramtinq commented 1 year ago

Version

7.0.2

Platforms

Android

Device Model

Android Emulator API Level 24

flutter info

[✓] Flutter (Channel stable, 3.7.3, on macOS 12.5.1 21G83 darwin-x64, locale
    en-US)
    • Flutter version 3.7.3 on channel stable at /Users/ramtinq/Codes/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9944297138 (3 weeks ago), 2023-02-08 15:46:04 -0800
    • Engine revision 248290d6d5
    • Dart version 2.19.2
    • DevTools version 2.20.1

Checking Android licenses is taking an unexpectedly long time...[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/ramtinq/Library/Android/sdk
    • Platform android-33, build-tools 33.0.2
    • ANDROID_HOME = /Users/ramtinq/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/ramtinq/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS
      development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.75.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.58.0

[✓] Connected device (3 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    •
      Android 7.0 (API 24) (emulator)
    • macOS (desktop)                    • macos         • darwin-x64     •
      macOS 12.5.1 21G83 darwin-x64
    • Chrome (web)                       • chrome        • web-javascript •
      Google Chrome 110.0.5481.177

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

How to reproduce?

Setting initialCropAspectRatio: CropAspectRatios.original sets full height with zero width crop.

Logs

No response

Example code (optional)

initEditorConfigHandler: (state) => EditorConfig(
                  cropRectPadding: const EdgeInsets.all(20.0),
                  initialCropAspectRatio: CropAspectRatios.original,
                ),


### Contact

_No response_
zmtzawqlp commented 1 year ago

do you have any demo to reproduce it?

AilurusRP commented 1 year ago

do you have any demo to reproduce it?

I tried using the project under extended_image/example, and replaced line 48 in example/lib/pages/simple/image_editor_demo.dart with initialCropAspectRatio: CropAspectRatios.original. The result would be as shown in the image below (Oneplus 8, Color OS 13). Screenshot_2023-05-04-18-48-57-89_27c1c6ae52a107c44bc2f4ba2eaa5366.jpg

zmtzawqlp commented 1 year ago

i can't reproduce at my side

ramtinq commented 1 year ago

do you have any demo to reproduce it?

I tried using the project under extended_image/example, and replaced line 48 in example/lib/pages/simple/image_editor_demo.dart with initialCropAspectRatio: CropAspectRatios.original. The result would be as shown in the image below (Oneplus 8, Color OS 13). Screenshot_2023-05-04-18-48-57-89_27c1c6ae52a107c44bc2f4ba2eaa5366.jpg

Yes exactly!