You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

node-webpmux

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-webpmux - npm Package Compare versions

Comparing version
2.0.0
to
2.0.1
bin/webpmux

Sorry, the diff of this file is not supported yet

+1
-1
{
"name": "node-webpmux",
"version": "2.0.0",
"version": "2.0.1",
"description": "A pure Javascript/WebAssembly re-implementation of webpmux",

@@ -5,0 +5,0 @@ "main": "webp.js",

@@ -53,2 +53,5 @@ # node-webpmux

##### `.hasAlpha` (read-only)
A boolean flag for easily checking if the image has transparency in any way.
##### `.frames` (read-only)

@@ -178,3 +181,3 @@ Returns the array of frames, if any, or undefined.<br />

##### `async Image.generateFrame({ path = undefined, buffer = undefined, img = undefined, x = undefined, y = undefined, duration = undefined, blend = undefined, dispose = undefined })`
##### `async Image.generateFrame({ path = undefined, buffer = undefined, img = undefined, x = undefined, y = undefined, delay = undefined, blend = undefined, dispose = undefined })`
Generates enough of an `anmf` structure to be placed in `.frames`.<br />

@@ -187,3 +190,3 @@ Note that, at the moment, only *static* images are supported in this function.

`img` will use an existing Image instance.
* `x`/`y`/`duration`/`blend`/`dispose`
* `x`/`y`/`delay`/`blend`/`dispose`
Explicitly set these properties. See the _Options for saving_ section for what these do.

@@ -276,3 +279,3 @@

width, height, // The frame's width and height.
duration, // The duration of the frame.
delay, // The duration of the frame.
blend, dispose, // The frame's blend/dispose flags.

@@ -314,1 +317,4 @@ // Additionally, one or more of the following.

`.demuxAnim()` was renamed to `.demux()`
## Breaking changes from 2.0.0 to 2.0.1
Image.generateFrame()'s `duration` input renamed to `delay`<br />

@@ -132,3 +132,3 @@ // For more information on the WebP format, see https://developers.google.com/speed/webp/docs/riff_container

height: buf.readUIntLE(9, 3) + 1,
duration: buf.readUIntLE(12, 3),
delay: buf.readUIntLE(12, 3),
blend: !(buf[15] & 0b00000010),

@@ -412,2 +412,3 @@ dispose: !!(buf[15] & 0b00000001)

get hasAnim() { return this.loaded ? this.data.extended ? this.data.extended.hasAnim : false : false; }
get hasAlpha() { return this.loaded ? this.data.extended ? this.data.extended.hasAlpha : this.data.vp8 ? this.data.vp8.alpha : this.data.vp8l ? this.data.vp8l.alpha : false : false; }
get anim() { return this.hasAnim ? this.data.anim : undefined; }

@@ -757,3 +758,3 @@ get frames() { return this.anim ? this.anim.frames : undefined; }

}
static async generateFrame({ path = undefined, buffer = undefined, img = undefined, x = undefined, y = undefined, duration = undefined, blend = undefined, dispose = undefined } = {}) {
static async generateFrame({ path = undefined, buffer = undefined, img = undefined, x = undefined, y = undefined, delay = undefined, blend = undefined, dispose = undefined } = {}) {
let _img = img;

@@ -772,3 +773,3 @@ if (((!path) && (!buffer) && (!img)) ||

y,
duration,
delay,
blend,

@@ -775,0 +776,0 @@ dispose