Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ramtinq opened this issue Mar 2, 2023 · 4 comments

Comments

@ramtinq
Copy link

ramtinq commented Mar 2, 2023

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
Copy link
Member

do you have any demo to reproduce it?

@AilurusRP
Copy link

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
Copy link
Member

i can't reproduce at my side

@ramtinq
Copy link
Author

ramtinq commented Jun 14, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants