node-midec
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

node-midec

Multi-image detector (Wasm). cf. Animated GIF, APNG, Animated WebP, Animated HEIF/AVIF.

Pure Webassembly + JavaScript port of midec.

Installation

$ npm i node-midec

Example

import { isAnimated } from 'node-midec'
import fs from 'fs/promises'

const filePath = new URL('./animated.gif', import.meta.url)
const file = await fs.readFile(filePath)
const result = await isAnimated(file)
console.log(`animated.gif is ${result ? '' : 'not '}an animated image.`)

Package Sidebar

Install

npm i node-midec

Weekly Downloads

3

Version

0.1.1

License

MIT

Unpacked Size

2.02 MB

Total Files

8

Last publish

Collaborators

  • sapphi-red