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

Animated PNG becomes static after conversion #3551

Closed
3 tasks done
romanlv opened this issue Feb 7, 2023 · 2 comments
Closed
3 tasks done

Animated PNG becomes static after conversion #3551

romanlv opened this issue Feb 7, 2023 · 2 comments

Comments

@romanlv
Copy link

romanlv commented Feb 7, 2023

Possible bug

Is this a possible bug in a feature of sharp, unrelated to installation?

  • Running npm install sharp completes without error.
  • Running node -e "require('sharp')" completes without error.

Are you using the latest version of sharp?

  • I am using the latest version of sharp as reported by npm view sharp dist-tags.latest.

What is the output of running npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp?

System:
OS: macOS 12.6
CPU: (10) arm64 Apple M1 Pro
Memory: 92.67 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.2 - /usr/local/bin/node
Yarn: 1.22.19 - ~/.npm-packages/bin/yarn
npm: 8.19.2 - ~/.npm-packages/bin/npm
npmPackages:
sharp: ^0.31.3 => 0.31.3

What are the steps to reproduce?

$ curl -Os https://ezgif.com/images/format-demo/butterfly.png


$ identify apng:butterfly.png
apng:butterfly.png=>butterfly.png[0] APNG 250x250 250x250+0+0 8-bit sRGB 534048B 0.040u 0:00.040
apng:butterfly.png=>butterfly.png[1] APNG 181x178 250x250+24+20 8-bit sRGB 0.040u 0:00.040
apng:butterfly.png=>butterfly.png[2] APNG 181x178 250x250+24+20 8-bit sRGB 0.040u 0:00.039
apng:butterfly.png=>butterfly.png[3] APNG 181x178 250x250+24+20 8-bit sRGB 0.040u 0:00.039
apng:butterfly.png=>butterfly.png[4] APNG 181x178 250x250+24+20 8-bit sRGB 0.040u 0:00.038
apng:butterfly.png=>butterfly.png[5] APNG 181x178 250x250+24+20 8-bit sRGB 0.030u 0:00.037
apng:butterfly.png=>butterfly.png[6] APNG 181x178 250x250+24+20 8-bit sRGB 0.030u 0:00.037
....


$ node -e "require('sharp')('butterfly.png', { animated: true }).resize({ width: 150 }).toFile('butterfly-out.png')"


$ identify apng:butterfly-out.png
apng:butterfly-out.png=>butterfly-out.png APNG 150x150 150x150+0+0 8-bit sRGB 6056B 0.010u 0:00.001

What is the expected behaviour?

Converted image to continue to have animation

@romanlv romanlv added the triage label Feb 7, 2023
@romanlv
Copy link
Author

romanlv commented Feb 7, 2023

it works fine for webp file formats (when input and output are webp e.g. file)

@lovell lovell removed the triage label Feb 8, 2023
@lovell
Copy link
Owner

lovell commented Feb 8, 2023

Please see #2375

@lovell lovell closed this as completed Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants