1.0.0 • Published 2 years ago

webpmux-bin v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

webpmux-bin

This is a bin wrapper for libwebp's webpmux. webpmux -- Create animated WebP files from non-animated WebP images, extract frames from animated WebP images, and manage XMP/EXIF metadata and ICC profile.

Install

npm install webpmux-bin

Use a different version of libwebp

By default, webpmux-bin uses the webpmux binary from the libwebp version specified in its package.json (see libwebp_version key).

But if you want, you can force this package to use another version of libwebp at the time you npm install it.

To do so, add the version to use to your package.json before running npm install webpmux:

{
    "libwebp_version": "1.3.0"
}

* Can be a specific version or "latest".

Usage

import {execFile} from 'node:child_process'
import webpmux from 'webpmux-bin'

execFile(webpmux, [
  '-strip', 'exif',
  'input.webp',
  '-o', 'output.webp',
], error => {
  if (error) throw error

  console.log('Image created!')
})

CLI

npm install --global webpmux-bin
webpmux -help

webpmux options

All command-line arguments are documented here.

Credits