qzb / is-animated

Checks if image is animated 🎞

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is-animated

npm travis coverage standard standard version

is-animated is a simple library for detecting animated images, it supports not only GIFs, but also APNG and WebP images.

Install

npm install is-animated

Example

const fs = require('fs')
const isAnimated = require('is-animated')

const filename = process.argv[2]

fs.readFile(filename, (err, buffer) => {
  const answer = isAnimated(buffer) ? 'Yes' : 'No'
  console.log(`Is "${filename}" animated? ${answer}.`)
})

License

MIT

About

Checks if image is animated 🎞

License:MIT License


Languages

Language:JavaScript 100.0%