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

is GIF crop supported ? #96

Open
Nico3652 opened this issue Aug 17, 2022 · 0 comments
Open

is GIF crop supported ? #96

Nico3652 opened this issue Aug 17, 2022 · 0 comments
Labels
handle: wontfix This will not be worked on type: feature New feature or request

Comments

@Nico3652
Copy link

Hi there,

The crop is working great for .jpg or .png but I'm not able to crop an animated GIF with this method :

 Future<Uint8List?> cropImageDataWithNativeLibrary(
      ExtendedImageEditorState? state) async {
    final Rect? cropRect = state!.getCropRect();
    final EditActionDetails? action = state.editAction;

    Uint8List? result;

    if (action != null) {
      final int rotateAngle = action.rotateAngle.toInt();
      final bool flipHorizontal = action.flipY;
      final bool flipVertical = action.flipX;
      final Uint8List img = state.rawImageData;

      final ImageEditorOption option = ImageEditorOption();
     
      if (action.needCrop && cropRect != null) {
        option.addOption(ClipOption.fromRect(cropRect));
      }


      if (action.needFlip) {
        option.addOption(
            FlipOption(horizontal: flipHorizontal, vertical: flipVertical));
      }

    
      if (action.hasRotateAngle) {
        option.addOption(RotateOption(rotateAngle));
      }

     
      result = await ImageEditor.editImage(
        image: img,
        imageEditorOption: option,
      );
    }
    return result;
  }

Is the GIF crop is supported ? I also tried editImageAndGetFile() but get no result.

How can this be done ? Thanks for help

@zmtzawqlp zmtzawqlp transferred this issue from fluttercandies/extended_image Aug 18, 2022
@CaiJingLong CaiJingLong added type: feature New feature or request handle: wontfix This will not be worked on labels Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
handle: wontfix This will not be worked on type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants