Giter VIP home page Giter VIP logo

Comments (5)

TomBor avatar TomBor commented on August 11, 2024 4

From the constructor page of Sharp website, there are 2 references to animated file in the options

  • options.pages number number of pages to extract for multi-page input (GIF, WebP, AVIF, TIFF, PDF), use -1 for all pages. (optional, default 1)
  • options.animated boolean Set to true to read all frames/pages of an animated image (equivalent of setting pages to -1). (optional, default false)

Would be great to have an option for webp animated or not in imagetools.

from imagetools.

EnderPicture avatar EnderPicture commented on August 11, 2024 2

Sorry for the delay, I was referring to this section

// Convert an animated GIF to an animated WebP
await sharp('in.gif', { animated: true }).toFile('out.webp');

from imagetools.

JonasKruckenberg avatar JonasKruckenberg commented on August 11, 2024

Your link seems to just go to their homepage and I couldn't find the specific option you mentioned.

Maybe you can provide a quick reproduction with a gif that would be converted into an animated webp normally but doesn't get converted when using imagetools so I can can check it out!

from imagetools.

millette avatar millette commented on August 11, 2024

I think he's referring to options.pages.

number of pages to extract for multi-page input (GIF, WebP, AVIF, TIFF, PDF), use -1 for all pages.

from imagetools.

Amerlander avatar Amerlander commented on August 11, 2024

Any plans to implements this?

I guess line 6 in util.ts has to be extended to receive the option to enable animations:

return sharp(path, { animated: true })

return sharp(path)

from imagetools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.