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] PlatformException on WebP images #106

Open
mitrakov opened this issue Feb 13, 2023 · 3 comments
Open

[Bug] PlatformException on WebP images #106

mitrakov opened this issue Feb 13, 2023 · 3 comments
Labels

Comments

@mitrakov
Copy link

Version

1.3.0

Platforms

macOS

Device Model

MacOS 10.15.7

flutter info

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.1, on Mac OS X 10.15.7 19H2026 darwin-x64, locale en-GB)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[!] Xcode - develop for iOS and macOS (Xcode 12.4)
    ✗ Flutter requires Xcode 13 or higher.
      Download the latest version or update via the Mac App Store.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] IntelliJ IDEA Community Edition (version 2022.3.1)
[✓] VS Code (version 1.74.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

! Doctor found issues in 2 categories.

How to reproduce?

Open any webp image and run:

final Uint8List image = ...; // any webp image
ImageEditor.editImage(image: image, imageEditorOption: option);

Logs

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(decode image error, null, null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18)
<asynchronous suspension>
#2      NativeChannel.memoryToMemory (package:image_editor_platform_interface/src/channel.dart:50:20)
<asynchronous suspension>
#3      ImageEditorCommon.editImage (package:image_editor_common/image_editor_common.dart:32:13)
<asynchronous suspension>

Example code (optional)

No response

Contact

[email protected]

@CaiJingLong
Copy link
Member

The ios/macOS decoder of native not support webp.
You must convert webp to png or jpeg first.

@mitrakov
Copy link
Author

You must convert webp to png or jpeg first.

Is it possible with this library?

@MayurSankhla
Copy link

MayurSankhla commented Feb 19, 2024

need solution of this issue. help

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

No branches or pull requests

3 participants