fluttercandies / flutter_image_compress

flutter image compress
MIT License
633 stars 214 forks source link

compressWithList always compress at min quality in Android when format is heic #260

Open siddharthadevops opened 1 year ago

siddharthadevops commented 1 year ago

Version

2.0.4

Platforms

Android

Device Model

Pixel 6a (Android 13)

flutter info

[!] Flutter (Channel stable, 3.13.3, on macOS 13.5.2 22G91 darwin-arm64, locale en-ES)
    • Flutter version 3.13.3 on channel stable at /users/siddhartha/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2524052335 (5 days ago), 2023-09-06 14:32:31 -0700
    • Engine revision b8d35810e9
    • Dart version 3.1.1
    • DevTools version 2.25.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/siddhartha/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

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

[✓] Android Studio (version 2022.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 17.0.6+0-17.0.6b802.4-9586694)

[✓] IntelliJ IDEA Community Edition (version 2023.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 75.1.4
    • Dart plugin version 232.9559.10

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

[✓] Connected device (4 available)
    • Pixel 6a (mobile)        • 29261JEGR09487            • android-arm64  • Android 13 (API 33)
    • iPhone de Dante (mobile) • 00008120-00062D983CC0C01E • ios            • iOS 16.6.1 20G81
    • macOS (desktop)          • macos                     • darwin-arm64   • macOS 13.5.2 22G91 darwin-arm64
    • Chrome (web)             • chrome                    • web-javascript • Google Chrome 116.0.5845.179
    ! Error: (null) needs to connect to determine its availability. Check the connection between the device and its companion iPhone, and the connection between the iPhone and Xcode. Both devices may also need to be restarted and unlocked.
      (code 1)

[✓] Network resources
    • All expected network resources are available.

How to reproduce?

await FlutterImageCompress.compressWithList(
      bytes,
      minWidth: minWidth.toInt(),
      minHeight: minHeight.toInt(),
      quality: 85,
      rotate: 0,
      format: CompressFormat.heic,
    );

Always compresses with the same quality (seems to be the maximum possible compression) regardless of what is passed in the quality parameter

Logs

No response

Example code (optional)

No response

Contact

No response