Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peckzeg/animated-webp-info
Get Animated WebP Image Info
https://github.com/peckzeg/animated-webp-info
Last synced: 10 days ago
JSON representation
Get Animated WebP Image Info
- Host: GitHub
- URL: https://github.com/peckzeg/animated-webp-info
- Owner: PeckZeg
- Created: 2016-02-19T06:44:43.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-19T06:50:40.000Z (almost 9 years ago)
- Last Synced: 2024-12-03T07:06:36.740Z (20 days ago)
- Language: JavaScript
- Size: 637 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Get Animated WebP Info
======================## Lib
You should install [webpmux](https://developers.google.com/speed/webp/docs/webpmux)
## Usage
```javascript
const webpInfo = require('animated-webp-info');var webpinfo = webpInfo('./test/test.webp', (err, result) => {
if (err) return console.warn(err);
console.log(result);
});
```You would get webp info like:
```json
{
"width": 480,
"height": 480,
"webp": {
"featuresPresent": "animation",
"bgColor": "0xFFFFFFFF",
"loopCount": 0,
"frames": [
{
"No": 1,
"width": 480,
"height": 480,
"alpha": "no",
"x_offset": 0,
"y_offset": 0,
"duration": 150,
"dispose": "none",
"blend": "yes",
"image_size": 168478
},
{
"No": 2,
"width": 480,
"height": 480,
"alpha": "no",
"x_offset": 0,
"y_offset": 0,
"duration": 150,
"dispose": "none",
"blend": "yes",
"image_size": 170004
},
{
"No": 3,
"width": 480,
"height": 480,
"alpha": "no",
"x_offset": 0,
"y_offset": 0,
"duration": 150,
"dispose": "none",
"blend": "yes",
"image_size": 155276
},
{
"No": 4,
"width": 480,
"height": 480,
"alpha": "no",
"x_offset": 0,
"y_offset": 0,
"duration": 150,
"dispose": "none",
"blend": "yes",
"image_size": 170004
}
],
"duration": 150
}
}
```