Skip to content

Commit 5a4b895

Browse files
committed
0.0.6
1 parent e6eabd3 commit 5a4b895

File tree

14 files changed

+66
-16
lines changed

14 files changed

+66
-16
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
authors = ["Tyrone Trevorrow <tyrone@sudeium.com>", "Gunnar Omander <gunnar@gomander.dev>"]
33
edition = "2021"
44
name = "gomander-napi-gif-encoder"
5-
version = "0.0.5"
5+
version = "0.0.6"
66

77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

index.d.mts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
export class GIFEncoder {
2+
/**
3+
* Create a new GIF Encoder instance.
4+
* @param width Image width. Must be < 65535.
5+
* @param height Image height. Must be < 65535.
6+
* @param file Absolute path to output file.
7+
*/
8+
constructor(width: number, height: number, file: string)
9+
/**
10+
* Add a frame to the GIF.
11+
* @param frame Buffer containing RGBA pixel data.
12+
*/
13+
addFrame(frame: Buffer): void
14+
/**
15+
* Sets the framerate for the GIF. Defaults to 25.
16+
* @param framerate Frame rate in FPS for the target GIF.
17+
*/
18+
setFrameRate(framerate: number): void
19+
/**
20+
* Sets the sampling factor for the Neuquant color quantization algorithm.
21+
* Generally: 1 is highest quality and slowest, 10 or higher is low
22+
* quality (lots of color banding) but fast. Must be < 65535.
23+
* Defaults to 10.
24+
* @param factor The new sampling factor.
25+
*/
26+
setSampleFactor(factor: number): void
27+
/**
28+
* Sets the number of times the GIF should repeat. Defaults to infinite.
29+
* @param count Number of times the GIF should loop after the first playthrough. 0 to play only once.
30+
*/
31+
setRepeat(count: number): void
32+
/**
33+
* Render the GIF and write it to disk. As the most time consuming step,
34+
* it is asynchronous.
35+
*/
36+
finish(): Promise<void>
37+
}

npm/android-arm-eabi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gomander/napi-gif-encoder-android-arm-eabi",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"os": ["android"],
55
"cpu": ["arm"],
66
"main": "napi-gif-encoder.android-arm-eabi.node",

npm/android-arm64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gomander/napi-gif-encoder-android-arm64",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"os": ["android"],
55
"cpu": ["arm64"],
66
"main": "napi-gif-encoder.android-arm64.node",

npm/linux-arm-gnueabihf/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gomander/napi-gif-encoder-linux-arm-gnueabihf",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"os": ["linux"],
55
"cpu": ["arm"],
66
"main": "napi-gif-encoder.linux-arm-gnueabihf.node",

npm/linux-arm64-gnu/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gomander/napi-gif-encoder-linux-arm64-gnu",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"os": ["linux"],
55
"cpu": ["arm64"],
66
"main": "napi-gif-encoder.linux-arm64-gnu.node",

npm/linux-arm64-musl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gomander/napi-gif-encoder-linux-arm64-musl",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"os": ["linux"],
55
"cpu": ["arm64"],
66
"main": "napi-gif-encoder.linux-arm64-musl.node",

npm/linux-x64-gnu/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gomander/napi-gif-encoder-linux-x64-gnu",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"os": ["linux"],
55
"cpu": ["x64"],
66
"main": "napi-gif-encoder.linux-x64-gnu.node",

npm/linux-x64-musl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gomander/napi-gif-encoder-linux-x64-musl",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"os": ["linux"],
55
"cpu": ["x64"],
66
"main": "napi-gif-encoder.linux-x64-musl.node",

0 commit comments

Comments
 (0)