wtfgif 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BENCHMARKS.md +185 -0
- package/CHANGELOG.md +54 -0
- package/CONTRIBUTING.md +27 -0
- package/LICENSE +21 -0
- package/README.md +166 -0
- package/dist/compiled.d.ts +77 -0
- package/dist/constants/gif.d.ts +17 -0
- package/dist/decoder/pool.d.ts +2 -0
- package/dist/decoder/reader.d.ts +80 -0
- package/dist/encoder/writer.d.ts +59 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/native/oneOff.d.ts +1 -0
- package/dist/native/runtime.d.ts +27 -0
- package/dist/types.d.ts +171 -0
- package/dist/utils/netscape.d.ts +16 -0
- package/dist/utils/palette.d.ts +4 -0
- package/dist/utils/subblocks.d.ts +4 -0
- package/dist/wasm/coreBackend.d.ts +2 -0
- package/dist/wasm/runtime.d.ts +24 -0
- package/dist/wasm-core/package.json +3 -0
- package/dist/wasm-core/wtfgif_core.d.ts +81 -0
- package/dist/wasm-core/wtfgif_core.js +1326 -0
- package/dist/wasm-core/wtfgif_core_bg.wasm +0 -0
- package/dist/wasm-core/wtfgif_core_bg.wasm.d.ts +51 -0
- package/dist/wasm-web/package.json +3 -0
- package/dist/wasm-web/wtfgif_core.d.ts +157 -0
- package/dist/wasm-web/wtfgif_core.js +1392 -0
- package/dist/wasm-web/wtfgif_core_bg.wasm +0 -0
- package/dist/wasm-web/wtfgif_core_bg.wasm.d.ts +51 -0
- package/package.json +125 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { decodeGifFramesRgba, remuxGifPixelPerfect, reencodeGifPixelPerfect, } from "./runtime";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { WasmCoreModule } from "../types";
|
|
2
|
+
export interface NativeDecodedRgbaFrames {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
frameCount: number;
|
|
6
|
+
pixels: Uint8Array;
|
|
7
|
+
}
|
|
8
|
+
export interface NativeAddonModule {
|
|
9
|
+
decodeFramesRgba: (gifData: Uint8Array) => NativeDecodedRgbaFrames;
|
|
10
|
+
encodeIndexedFast: (indexedFrames: Uint8Array, width: number, height: number, frameCount: number, palette: Uint32Array, delays: Uint16Array, loopCount: number, delta: boolean) => Uint8Array;
|
|
11
|
+
encodeRgbaFast: (rgbaFrames: Uint8Array, width: number, height: number, frameCount: number, palette: Uint32Array, delays: Uint16Array, loopCount: number, delta: boolean) => Uint8Array;
|
|
12
|
+
reencodeGifFast: (gifData: Uint8Array) => Uint8Array;
|
|
13
|
+
}
|
|
14
|
+
export declare function decodeGifFramesRgba(gifData: Uint8Array): NativeDecodedRgbaFrames;
|
|
15
|
+
export declare function reencodeGifPixelPerfect(gifData: Uint8Array): Uint8Array;
|
|
16
|
+
export declare let remuxGifPixelPerfect: (gifData: Uint8Array) => Uint8Array;
|
|
17
|
+
export declare function prepareWasmOneOffApi(module: WasmCoreModule | null): void;
|
|
18
|
+
export declare function setNativeAddonModule(module: NativeAddonModule | null): void;
|
|
19
|
+
export declare function getNativeAddonModule(): NativeAddonModule | null;
|
|
20
|
+
export declare function getNativeAddonStatus(): {
|
|
21
|
+
name: string;
|
|
22
|
+
available: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare function getFastBackendStatus(): {
|
|
25
|
+
name: "wtfgif-rust-native" | "wtfgif-rust-wasm" | null;
|
|
26
|
+
available: boolean;
|
|
27
|
+
};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
export interface WasmCoreInstance {
|
|
2
|
+
width: () => number;
|
|
3
|
+
height: () => number;
|
|
4
|
+
frame_count: () => number;
|
|
5
|
+
metadata_json: () => string;
|
|
6
|
+
decode_frame_indices: (frameIndex: number) => Uint8Array;
|
|
7
|
+
decode_frame_rgba: (frameIndex: number) => Uint8Array;
|
|
8
|
+
decode_frame_bgra: (frameIndex: number) => Uint8Array;
|
|
9
|
+
decode_all_rgba?: () => Uint32Array;
|
|
10
|
+
reencode_gif_pixel_perfect?: () => Uint8Array;
|
|
11
|
+
prepare_composited_rgba: (requestedFrames: Uint8Array) => Uint32Array;
|
|
12
|
+
prepare_composited_bgra: (requestedFrames: Uint8Array) => Uint32Array;
|
|
13
|
+
prepare_composited_delta_rgba: (requestedFrames: Uint8Array) => Uint32Array;
|
|
14
|
+
prepare_composited_delta_bgra: (requestedFrames: Uint8Array) => Uint32Array;
|
|
15
|
+
free: () => void;
|
|
16
|
+
}
|
|
17
|
+
export interface WasmCoreModule {
|
|
18
|
+
WtfGifCore: new (data: Uint8Array) => WasmCoreInstance;
|
|
19
|
+
core_version?: () => string;
|
|
20
|
+
parse_metadata_json?: (data: Uint8Array) => string;
|
|
21
|
+
decode_frame_indices?: (data: Uint8Array, frameIndex: number) => Uint8Array;
|
|
22
|
+
decode_frame_rgba?: (data: Uint8Array, frameIndex: number) => Uint8Array;
|
|
23
|
+
decode_frame_bgra?: (data: Uint8Array, frameIndex: number) => Uint8Array;
|
|
24
|
+
decode_all_rgba?: (data: Uint8Array) => Uint32Array;
|
|
25
|
+
reencode_gif_pixel_perfect?: (data: Uint8Array) => Uint8Array;
|
|
26
|
+
remux_gif_pixel_perfect?: (data: Uint8Array) => Uint8Array;
|
|
27
|
+
prepare_reencode_hot_path?: () => void;
|
|
28
|
+
reencode_hot_path_primer?: (side: number, frameCount: number) => Uint8Array;
|
|
29
|
+
remux_hot_path_primer?: () => Uint8Array;
|
|
30
|
+
prepare_composited_rgba?: (data: Uint8Array, requestedFrames: Uint8Array) => Uint32Array;
|
|
31
|
+
prepare_composited_bgra?: (data: Uint8Array, requestedFrames: Uint8Array) => Uint32Array;
|
|
32
|
+
prepare_composited_delta_rgba?: (data: Uint8Array, requestedFrames: Uint8Array) => Uint32Array;
|
|
33
|
+
prepare_composited_delta_bgra?: (data: Uint8Array, requestedFrames: Uint8Array) => Uint32Array;
|
|
34
|
+
encode_indexed_lzw?: (indexStream: Uint8Array, minCodeSize: number, colorCount: number) => Uint8Array;
|
|
35
|
+
encode_indexed_gif?: (indexStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delay: number, loopCount: number) => Uint8Array;
|
|
36
|
+
encode_indexed_gif_with_delays?: (indexStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delays: Uint16Array, loopCount: number) => Uint8Array;
|
|
37
|
+
encode_indexed_literal_gif?: (indexStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delay: number, loopCount: number) => Uint8Array;
|
|
38
|
+
encode_indexed_literal_gif_with_delays?: (indexStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delays: Uint16Array, loopCount: number) => Uint8Array;
|
|
39
|
+
encode_indexed_literal_delta_gif?: (indexStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delay: number, loopCount: number) => Uint8Array;
|
|
40
|
+
encode_indexed_literal_delta_gif_with_delays?: (indexStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delays: Uint16Array, loopCount: number) => Uint8Array;
|
|
41
|
+
encode_indexed_delta_gif?: (indexStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delay: number, loopCount: number) => Uint8Array;
|
|
42
|
+
encode_indexed_delta_gif_with_delays?: (indexStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delays: Uint16Array, loopCount: number) => Uint8Array;
|
|
43
|
+
encode_rgba_gif?: (rgbaStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delay: number, loopCount: number, deltas: boolean) => Uint8Array;
|
|
44
|
+
encode_rgba_gif_with_options?: (rgbaStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delays: Uint16Array, loopCount: number, deltas: boolean, alphaThreshold: number) => Uint8Array;
|
|
45
|
+
encode_rgba_literal_gif?: (rgbaStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delay: number, loopCount: number) => Uint8Array;
|
|
46
|
+
encode_rgba_literal_gif_with_options?: (rgbaStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delays: Uint16Array, loopCount: number, alphaThreshold: number) => Uint8Array;
|
|
47
|
+
encode_rgba_literal_delta_gif?: (rgbaStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delay: number, loopCount: number) => Uint8Array;
|
|
48
|
+
encode_rgba_literal_delta_gif_with_options?: (rgbaStream: Uint8Array, width: number, height: number, frameCount: number, paletteRgb: Uint32Array, delays: Uint16Array, loopCount: number, alphaThreshold: number) => Uint8Array;
|
|
49
|
+
}
|
|
50
|
+
export interface PooledDecoderTables {
|
|
51
|
+
decTable: Int32Array;
|
|
52
|
+
stack: Uint8Array;
|
|
53
|
+
firstByte: Int16Array;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The byte-container contract used by omggif.
|
|
57
|
+
*
|
|
58
|
+
* Arrays, Uint8Array instances, and Node Buffers all satisfy this interface.
|
|
59
|
+
*/
|
|
60
|
+
export interface GifBinary {
|
|
61
|
+
readonly length: number;
|
|
62
|
+
[index: number]: number;
|
|
63
|
+
}
|
|
64
|
+
export type GifPixelBuffer = number[] | Uint8Array | Uint8ClampedArray;
|
|
65
|
+
export type PaletteRGB = number[];
|
|
66
|
+
export interface GifOptions {
|
|
67
|
+
background?: number;
|
|
68
|
+
loop?: number | null;
|
|
69
|
+
palette?: PaletteRGB | null;
|
|
70
|
+
}
|
|
71
|
+
export interface FrameOptions {
|
|
72
|
+
delay?: number;
|
|
73
|
+
disposal?: number;
|
|
74
|
+
palette?: PaletteRGB | null;
|
|
75
|
+
transparent?: number | null;
|
|
76
|
+
}
|
|
77
|
+
export type PreparedFrameFormat = "rgba" | "bgra";
|
|
78
|
+
export type PreparedFrameCacheMode = "auto" | "indices" | "rgba" | "sparse-rgba" | "composited";
|
|
79
|
+
export type PreparedFrameBackendPreference = "auto" | "javascript" | "native";
|
|
80
|
+
export type PreparedFrameDedupeMode = "none" | "adjacent" | "all";
|
|
81
|
+
export interface PrepareFramesOptions {
|
|
82
|
+
format?: PreparedFrameFormat;
|
|
83
|
+
composited?: boolean;
|
|
84
|
+
cache?: PreparedFrameCacheMode;
|
|
85
|
+
frameIndices?: readonly number[];
|
|
86
|
+
maxBytes?: number;
|
|
87
|
+
backend?: PreparedFrameBackendPreference;
|
|
88
|
+
deltas?: boolean;
|
|
89
|
+
dedupe?: PreparedFrameDedupeMode;
|
|
90
|
+
}
|
|
91
|
+
export interface PreparedGifFrame {
|
|
92
|
+
index: number;
|
|
93
|
+
x: number;
|
|
94
|
+
y: number;
|
|
95
|
+
width: number;
|
|
96
|
+
height: number;
|
|
97
|
+
delay: number;
|
|
98
|
+
disposal: number;
|
|
99
|
+
byteLength: number;
|
|
100
|
+
isFullCanvas: boolean;
|
|
101
|
+
changedX?: number;
|
|
102
|
+
changedY?: number;
|
|
103
|
+
changedWidth?: number;
|
|
104
|
+
changedHeight?: number;
|
|
105
|
+
changedPixels?: Uint32Array | undefined;
|
|
106
|
+
pixels?: Uint32Array;
|
|
107
|
+
colors?: Uint32Array;
|
|
108
|
+
spans?: Uint32Array;
|
|
109
|
+
positions?: Uint32Array;
|
|
110
|
+
indices?: Uint8Array;
|
|
111
|
+
palette?: Uint32Array;
|
|
112
|
+
}
|
|
113
|
+
export interface PreparedGifFrames {
|
|
114
|
+
width: number;
|
|
115
|
+
height: number;
|
|
116
|
+
format: PreparedFrameFormat;
|
|
117
|
+
composited: boolean;
|
|
118
|
+
frames: PreparedGifFrame[];
|
|
119
|
+
byteLength: number;
|
|
120
|
+
maxBytes: number | null;
|
|
121
|
+
getFrame: (index: number) => PreparedGifFrame | undefined;
|
|
122
|
+
getFramePixels: (index: number) => Uint32Array | undefined;
|
|
123
|
+
getFrameBytes: (index: number) => Uint8Array | undefined;
|
|
124
|
+
copyFrame: (index: number, target: Uint8Array | Uint32Array) => void;
|
|
125
|
+
createPlayer: (target?: Uint8Array | Uint32Array) => PreparedGifPlayer;
|
|
126
|
+
dispose: () => void;
|
|
127
|
+
}
|
|
128
|
+
export interface PreparedGifPlayer {
|
|
129
|
+
target: Uint32Array;
|
|
130
|
+
currentIndex: number;
|
|
131
|
+
drawFrame: (index: number) => Uint32Array;
|
|
132
|
+
next: () => Uint32Array;
|
|
133
|
+
reset: () => void;
|
|
134
|
+
}
|
|
135
|
+
export interface GifDecodeBackendStatus {
|
|
136
|
+
name: string;
|
|
137
|
+
available: boolean;
|
|
138
|
+
}
|
|
139
|
+
export interface GifDecodeBackend {
|
|
140
|
+
name: string;
|
|
141
|
+
isAvailable: () => boolean;
|
|
142
|
+
prepareFrames?: (gifData: Uint8Array, options: Required<Pick<PrepareFramesOptions, "format" | "composited">> & PrepareFramesOptions) => PreparedGifFrames | null;
|
|
143
|
+
}
|
|
144
|
+
/** Frame metadata compatible with omggif's public Frame type. */
|
|
145
|
+
export interface Frame {
|
|
146
|
+
x: number;
|
|
147
|
+
y: number;
|
|
148
|
+
width: number;
|
|
149
|
+
height: number;
|
|
150
|
+
has_local_palette: boolean;
|
|
151
|
+
palette_offset: number | null;
|
|
152
|
+
palette_size: number | null;
|
|
153
|
+
data_offset: number;
|
|
154
|
+
data_length: number;
|
|
155
|
+
transparent_index: number | null;
|
|
156
|
+
interlaced: boolean;
|
|
157
|
+
delay: number;
|
|
158
|
+
disposal: number;
|
|
159
|
+
}
|
|
160
|
+
export type FrameInfo = Frame & {
|
|
161
|
+
min_code_size: number;
|
|
162
|
+
codes?: Uint8Array;
|
|
163
|
+
indices?: Uint8Array;
|
|
164
|
+
pal32rgba?: Uint32Array;
|
|
165
|
+
pal32bgra?: Uint32Array;
|
|
166
|
+
rgbaColors?: Uint32Array;
|
|
167
|
+
bgraColors?: Uint32Array;
|
|
168
|
+
opaqueSpans?: Uint32Array;
|
|
169
|
+
opaquePositions?: Uint32Array;
|
|
170
|
+
decodeCount?: number;
|
|
171
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GifBinary } from "../types";
|
|
2
|
+
export declare const NETSCAPE_APPLICATION_ID: Uint8Array<ArrayBuffer>;
|
|
3
|
+
/**
|
|
4
|
+
* Write a Netscape loop count application extension to the buffer.
|
|
5
|
+
* Returns the new buffer position after the extension.
|
|
6
|
+
*/
|
|
7
|
+
export declare function writeNetscapeLoopCount(buf: GifBinary, p: number, loopCount: number): number;
|
|
8
|
+
/**
|
|
9
|
+
* Attempt to read a Netscape loop count application extension starting
|
|
10
|
+
* at the given position. If the extension matches, returns the loop count
|
|
11
|
+
* and the next buffer position; otherwise returns null.
|
|
12
|
+
*/
|
|
13
|
+
export declare function readNetscapeLoopCount(buf: Uint8Array, p: number): {
|
|
14
|
+
loopCount: number;
|
|
15
|
+
nextPos: number;
|
|
16
|
+
} | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PaletteRGB } from "../types";
|
|
2
|
+
export declare function log2Pow2(n: number): number;
|
|
3
|
+
export declare function checkPalette(pal: PaletteRGB): number;
|
|
4
|
+
export declare function buildPal32(buf: Uint8Array, paletteOffset: number, paletteSize: number, order: "rgba" | "bgra", transparentIndex?: number | null): Uint32Array;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { WasmCoreModule } from "../types";
|
|
2
|
+
export type WasmWebModule = WasmCoreModule & {
|
|
3
|
+
default?: (moduleOrPath?: unknown) => Promise<unknown>;
|
|
4
|
+
};
|
|
5
|
+
export declare function setWasmCoreModule(module: WasmCoreModule | null): void;
|
|
6
|
+
export declare function getWasmCoreModule(): WasmCoreModule | null;
|
|
7
|
+
export declare const initializeGlobalWasm: (moduleOrPath?: unknown) => Promise<void>;
|
|
8
|
+
export declare function initializeWasmModule(module: WasmWebModule, moduleOrPath?: unknown): Promise<void>;
|
|
9
|
+
export declare function getWasmFeatures(): {
|
|
10
|
+
supported: boolean;
|
|
11
|
+
simd: boolean;
|
|
12
|
+
threads: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare function getWasmStatus(): {
|
|
15
|
+
supported: boolean;
|
|
16
|
+
simd: boolean;
|
|
17
|
+
threads: boolean;
|
|
18
|
+
initialized: boolean;
|
|
19
|
+
workerPoolAvailable: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare function getWasmInitPromise(): Promise<void> | null;
|
|
22
|
+
export declare function setWasmInitPromise(promise: Promise<void> | null): void;
|
|
23
|
+
export declare function isWasmReady(): boolean;
|
|
24
|
+
export declare function cleanupWasm(): void;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
export class WtfGifCore {
|
|
5
|
+
free(): void;
|
|
6
|
+
[Symbol.dispose](): void;
|
|
7
|
+
decode_all_rgba(): Uint32Array;
|
|
8
|
+
decode_frame_bgra(frame_index: number): Uint8Array;
|
|
9
|
+
decode_frame_indices(frame_index: number): Uint8Array;
|
|
10
|
+
decode_frame_rgba(frame_index: number): Uint8Array;
|
|
11
|
+
frame_count(): number;
|
|
12
|
+
height(): number;
|
|
13
|
+
metadata_json(): string;
|
|
14
|
+
constructor(data: Uint8Array);
|
|
15
|
+
prepare_composited_bgra(requested_frames: Uint8Array): Uint32Array;
|
|
16
|
+
prepare_composited_delta_bgra(requested_frames: Uint8Array): Uint32Array;
|
|
17
|
+
prepare_composited_delta_rgba(requested_frames: Uint8Array): Uint32Array;
|
|
18
|
+
prepare_composited_rgba(requested_frames: Uint8Array): Uint32Array;
|
|
19
|
+
reencode_gif_pixel_perfect(): Uint8Array;
|
|
20
|
+
width(): number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function core_version(): string;
|
|
24
|
+
|
|
25
|
+
export function decode_all_rgba(data: Uint8Array): Uint32Array;
|
|
26
|
+
|
|
27
|
+
export function decode_frame_bgra(data: Uint8Array, frame_index: number): Uint8Array;
|
|
28
|
+
|
|
29
|
+
export function decode_frame_indices(data: Uint8Array, frame_index: number): Uint8Array;
|
|
30
|
+
|
|
31
|
+
export function decode_frame_rgba(data: Uint8Array, frame_index: number): Uint8Array;
|
|
32
|
+
|
|
33
|
+
export function encode_indexed_delta_gif(index_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delay: number, loop_count: number): Uint8Array;
|
|
34
|
+
|
|
35
|
+
export function encode_indexed_delta_gif_with_delays(index_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delays: Uint16Array, loop_count: number): Uint8Array;
|
|
36
|
+
|
|
37
|
+
export function encode_indexed_gif(index_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delay: number, loop_count: number): Uint8Array;
|
|
38
|
+
|
|
39
|
+
export function encode_indexed_gif_with_delays(index_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delays: Uint16Array, loop_count: number): Uint8Array;
|
|
40
|
+
|
|
41
|
+
export function encode_indexed_literal_delta_gif(index_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delay: number, loop_count: number): Uint8Array;
|
|
42
|
+
|
|
43
|
+
export function encode_indexed_literal_delta_gif_with_delays(index_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delays: Uint16Array, loop_count: number): Uint8Array;
|
|
44
|
+
|
|
45
|
+
export function encode_indexed_literal_gif(index_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delay: number, loop_count: number): Uint8Array;
|
|
46
|
+
|
|
47
|
+
export function encode_indexed_literal_gif_with_delays(index_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delays: Uint16Array, loop_count: number): Uint8Array;
|
|
48
|
+
|
|
49
|
+
export function encode_indexed_lzw(index_stream: Uint8Array, min_code_size: number, color_count: number): Uint8Array;
|
|
50
|
+
|
|
51
|
+
export function encode_rgba_gif(rgba_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delay: number, loop_count: number, deltas: boolean): Uint8Array;
|
|
52
|
+
|
|
53
|
+
export function encode_rgba_gif_with_options(rgba_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delays: Uint16Array, loop_count: number, deltas: boolean, alpha_threshold: number): Uint8Array;
|
|
54
|
+
|
|
55
|
+
export function encode_rgba_literal_delta_gif(rgba_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delay: number, loop_count: number): Uint8Array;
|
|
56
|
+
|
|
57
|
+
export function encode_rgba_literal_delta_gif_with_options(rgba_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delays: Uint16Array, loop_count: number, alpha_threshold: number): Uint8Array;
|
|
58
|
+
|
|
59
|
+
export function encode_rgba_literal_gif(rgba_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delay: number, loop_count: number): Uint8Array;
|
|
60
|
+
|
|
61
|
+
export function encode_rgba_literal_gif_with_options(rgba_stream: Uint8Array, width: number, height: number, frame_count: number, palette_rgb: Uint32Array, delays: Uint16Array, loop_count: number, alpha_threshold: number): Uint8Array;
|
|
62
|
+
|
|
63
|
+
export function parse_metadata_json(data: Uint8Array): string;
|
|
64
|
+
|
|
65
|
+
export function prepare_composited_bgra(data: Uint8Array, requested_frames: Uint8Array): Uint32Array;
|
|
66
|
+
|
|
67
|
+
export function prepare_composited_delta_bgra(data: Uint8Array, requested_frames: Uint8Array): Uint32Array;
|
|
68
|
+
|
|
69
|
+
export function prepare_composited_delta_rgba(data: Uint8Array, requested_frames: Uint8Array): Uint32Array;
|
|
70
|
+
|
|
71
|
+
export function prepare_composited_rgba(data: Uint8Array, requested_frames: Uint8Array): Uint32Array;
|
|
72
|
+
|
|
73
|
+
export function prepare_reencode_hot_path(): void;
|
|
74
|
+
|
|
75
|
+
export function reencode_gif_pixel_perfect(data: Uint8Array): Uint8Array;
|
|
76
|
+
|
|
77
|
+
export function reencode_hot_path_primer(side: number, frame_count: number): Uint8Array;
|
|
78
|
+
|
|
79
|
+
export function remux_gif_pixel_perfect(data: Uint8Array): Uint8Array;
|
|
80
|
+
|
|
81
|
+
export function remux_hot_path_primer(): Uint8Array;
|