fengyuanchen / cropper

⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-cropper
MIT License
7.75k stars 1.74k forks source link

GIF Image's only first frame is stored #978

Closed girishsalaskar closed 6 years ago

girishsalaskar commented 6 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report 
[x] Feature request
[ ] Documentation issue or request

Current behavior

Steps:

  1. Upload GIF
  2. Rotate GIF to left/right
  3. Export rotated GIF

Result: As original GIF shows all frames, new GIF does not display all frames

Expected behavior

After rotating, the new GIF should display all frames with rotation effect.

Environment


Cropper version: v3.0.0-rc.3

Browser: All browsers supporting cropper plugin

fengyuanchen commented 6 years ago

The getCroppedCanvas method use the canvas.drawImage API to crop image in browser, canvas.drawImage only draw the first frame image into a canvas. So you may have to upload the GIF image to server and crop it by yourself.

In short, Cropper does not support this.

girishsalaskar commented 5 years ago

Thanks for the description :+1: