1.0.3 • Published 7 months ago

@ashiteam/ashi-is-animated-image v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

@ashiteam/ashi-is-animated-image

My library to detect if an image is an animated image.

Description

You can pass in a Buffer containing the binary of an image to isAnimated which would return tru or false to indicate if the image is an animated image or not.

Usage

Web

const imageUrl = 'https://somesite.com/someimage';
const fetchedImage = await fetch(imageUrl);
const imageBuffer = Buffer.from(await fetchedImage.arrayBuffer());
const imageIsAnimated = isAnimated(imageBuffer)

NodeJS

const pathToImage = './someimage.gif'
const buffer = fs.readFileSync(pathToImage);
const imageIsAnimated = isAnimated(buffer);
1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago