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
libwebp
Use a different version of 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
- This package is made by Philip van Heemstra
-
webpmux is part of libwebp, and was written by the WebP team.
The latest source tree is available at https://chromium.googlesource.com/webm/libwebp/