node-webpmux
Advanced tools
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", |
+9
-3
@@ -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 /> |
+4
-3
@@ -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 |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
420950
3.64%9
12.5%999
0.1%316
1.94%4
-20%