Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qzb/is-animated
Checks if image is animated 🎞
https://github.com/qzb/is-animated
animation apng gif gif-animation nodejs png webp
Last synced: 2 months ago
JSON representation
Checks if image is animated 🎞
- Host: GitHub
- URL: https://github.com/qzb/is-animated
- Owner: qzb
- License: mit
- Created: 2016-06-06T20:26:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-14T00:58:18.000Z (about 2 years ago)
- Last Synced: 2024-11-01T23:47:48.331Z (3 months ago)
- Topics: animation, apng, gif, gif-animation, nodejs, png, webp
- Language: JavaScript
- Homepage:
- Size: 286 KB
- Stars: 36
- Watchers: 3
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# is-animated
[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]
[![coverage][coveralls-image]][coveralls-url]
[![standard][standard-image]][standard-url]
[![standard version][standard-version-image]][standard-version-url]**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
```js
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](LICENSE.md)
[npm-image]: https://img.shields.io/npm/v/is-animated.svg
[npm-url]: https://www.npmjs.com/package/is-animated
[travis-image]: https://img.shields.io/travis/qzb/is-animated.svg
[travis-url]: https://travis-ci.org/qzb/is-animated
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
[standard-url]: http://npm.im/standard
[standard-version-image]: https://img.shields.io/badge/release-standard%20version-brightgreen.svg
[standard-version-url]: https://github.com/conventional-changelog/standard-version
[coveralls-image]: https://img.shields.io/coveralls/qzb/is-animated/master.svg
[coveralls-url]: https://coveralls.io/r/qzb/is-animated?branch=master