fluttercandies / saver_gallery

MIT License
15 stars 15 forks source link

[Bug report] Can't save GIF on iOS #7

Closed pbaudri closed 1 year ago

pbaudri commented 1 year ago

Version

2.0.1

Platforms

iOS

Device Model

Iphone 14 pro Max

flutter info

FINE: Pub 2.19.5
[✓] Flutter (Channel stable, 3.7.8, on macOS 13.4.1 22F770820d darwin-arm64, locale fr-FR)
    • Flutter version 3.7.8 on channel stable at /Users/pierreb/fvm/versions/3.7.8
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 90c64ed42b (il y a 4 mois), 2023-03-21 11:27:08 -0500
    • Engine revision 9aa7816315
    • Dart version 2.19.5
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/pierreb/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • 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.0

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] 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)

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

[✓] Connected device (2 available)
    • iPhone 14 Pro Max (mobile) • 293BBAC4-0447-48FB-83A6-F993377F65BB • ios          • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)

How to reproduce?

I'm using your package to save images in .jpg or .gif format. Unfortunately I'm having problems on the iOS side when I want to save a .gif the saved file appears as a .jpg image.

To reproduce this error, simply display a .gif in your application and save it using the .saveImage() method. The saving will be completed but the result will be an image and not a GIF.

Logs

No response

Example code (optional)

Example GIF link : "https://media.tenor.com/P-8ZvqnS4AwAAAAM/dancing-cat-dancing-kitten.gif"

And for the code I'm using this :

await SaverGallery.saveImage(
     file.readAsBytesSync(),
     name: 'image_${DateTime.now()}',
     androidExistNotSave: false,
   );

I got the file from the url with the dio package :

response = await Dio().get<List<int>>(
  url,
  options: Options(
    responseType: ResponseType.bytes,
  ),
);

Contact

No response

zhangruiyu commented 1 year ago

Please post your code, and also send the image or image link

pbaudri commented 1 year ago

I've edited the post. Sorry for the missing informations

zhangruiyu commented 1 year ago

since it is already night in our country, I will solve this problem tomorrow

zhangruiyu commented 1 year ago

image

https://github.com/fluttercandies/saver_gallery/assets/10591822/05c4ea52-3f82-4e29-a92e-9a2f5bb3ced8

I used the same emulator that can be saved, If you can follow the example code to try to see if you can save successfully

pbaudri commented 1 year ago

Ok seems good on my side, might be an error or I was exhausted idk.

Sorry to have disturbed you.