imagescript 3.20.3 → 4.0.0-rc.2
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/LICENSE +16 -12
- package/README.md +21 -12
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/animation-encoder.d.ts +1 -34
- package/dist/animation-encoder.js +35 -34
- package/dist/animation.d.ts +108 -122
- package/dist/animation.js +285 -121
- package/dist/codecs/av1/decode.js +1 -1
- package/dist/codecs/av1/encode.js +1 -1
- package/dist/codecs/gif.js +11 -9
- package/dist/codecs/hdr.d.ts +1 -1
- package/dist/codecs/jpeg.js +13 -13
- package/dist/codecs/jxl/headers.js +3 -3
- package/dist/codecs/jxl/patches-enc.js +1 -1
- package/dist/codecs/jxl.js +5 -5
- package/dist/codecs/netpbm.js +7 -7
- package/dist/codecs/png.js +15 -15
- package/dist/codecs/quantize.js +34 -8
- package/dist/codecs/tiff.js +1 -1
- package/dist/codecs/webp.js +3 -3
- package/dist/codecs/zlib.js +1 -1
- package/dist/colors.d.ts +8 -7
- package/dist/colors.js +23 -3
- package/dist/frame.d.ts +94 -100
- package/dist/frame.js +89 -65
- package/dist/gainmap.d.ts +88 -46
- package/dist/gainmap.js +75 -51
- package/dist/image-type.d.ts +6 -1
- package/dist/image-type.js +4 -1
- package/dist/image.d.ts +317 -738
- package/dist/image.js +308 -438
- package/dist/index.d.ts +19 -25
- package/dist/index.js +15 -14
- package/dist/metadata.d.ts +4 -3
- package/dist/metadata.js +9 -7
- package/dist/render/colr.js +1 -1
- package/dist/render/font.js +1 -1
- package/dist/render/layout.js +1 -1
- package/dist/render/segment.js +1 -1
- package/dist/render/shapers/hangul.js +1 -1
- package/dist/render/svg.js +68 -20
- package/dist/render/text.js +7 -9
- package/dist/text-layout.d.ts +5 -35
- package/dist/text-layout.js +11 -12
- package/dist/util/gain.js +12 -12
- package/dist/util/mem.d.ts +1 -1
- package/dist/util/optimize.js +3 -1
- package/dist/util/options.js +46 -7
- package/package.json +15 -10
- package/LICENSE.AGPL-3.0 +0 -619
- package/LICENSE.MIT +0 -19
- package/dist/gif.d.ts +0 -36
- package/dist/gif.js +0 -22
- package/dist/util/rotate.js +0 -43
- package/dist/version.js +0 -1
package/dist/animation.d.ts
CHANGED
|
@@ -1,52 +1,28 @@
|
|
|
1
1
|
import { BinaryData } from './util/mem.js';
|
|
2
|
-
import
|
|
3
|
-
import { ResizeMode, ResizeOptions, ResizeToOptions } from './image.js';
|
|
2
|
+
import { DecodeOptions, EncodeOptions, GIFEncodeOptions, ResizeOptions, ResizeToOptions, RotateOptions, TransformOptions, AffineTransform, ShadowOptions, OutlineOptions, TrimOptions } from './image.js';
|
|
4
3
|
import { Frame } from './frame.js';
|
|
5
|
-
import { Metadata } from './metadata.js';
|
|
6
4
|
import { AnimationEncoder } from './animation-encoder.js';
|
|
7
5
|
/** Options of {@link Animation} */
|
|
8
6
|
export interface AnimationOptions {
|
|
9
7
|
/**
|
|
10
|
-
* How many times to repeat the animation
|
|
11
|
-
*
|
|
8
|
+
* How many times to repeat the animation: `Infinity` loops forever, 0 plays once, 1 plays twice, ... Anything else
|
|
9
|
+
* throws: a RangeError unless it is an integer from 0 or `Infinity`, a TypeError unless it is a number. Default:
|
|
10
|
+
* `Infinity`
|
|
12
11
|
*/
|
|
13
12
|
loopCount?: number;
|
|
14
13
|
}
|
|
15
|
-
/** Options of {@link Animation
|
|
16
|
-
export interface
|
|
17
|
-
/** Whether to stop decoding after the first frame. Default: `false` */
|
|
18
|
-
onlyFirstFrame?: boolean;
|
|
14
|
+
/** Options of {@link Animation}'s constructor: the canvas size and the loop count */
|
|
15
|
+
export interface AnimationCanvasOptions extends AnimationOptions {
|
|
19
16
|
/**
|
|
20
|
-
* The
|
|
21
|
-
*
|
|
22
|
-
* bombs) can't exhaust the memory. Default: `268402689` (16383², like sharp), `Infinity` for no limit
|
|
17
|
+
* The canvas width in pixels: frames (or the parts of them) outside the canvas aren't encoded. Default: the
|
|
18
|
+
* frames' right edge (the largest `xOffset + width`), following the frames until a canvas size is set
|
|
23
19
|
*/
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
/** At most this many worker threads decode in parallel, like `threads` of {@link Image.decode}. Default: the processors available, at most 8 */
|
|
28
|
-
threads?: number;
|
|
29
|
-
/**
|
|
30
|
-
* Whether to rotate/mirror the frames as the orientation tag (Exif, JPEG XL's header, PNG's eXIf chunk or XMP)
|
|
31
|
-
* says, like `applyOrientation` of {@link Image.decode}: APNGs, animated WebPs and JPEG XLs. Default: `true`
|
|
32
|
-
*/
|
|
33
|
-
applyOrientation?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* How HDR (PQ or HLG) JPEG XL animations, whose light can be brighter than (SDR) white, become 8 bit sRGB, like
|
|
36
|
-
* `toneMapping` of {@link Image.decode}: `'reinhard'` compresses the brightest parts, `'clamp'` clamps everything
|
|
37
|
-
* brighter than white. Default: `'reinhard'`
|
|
38
|
-
*/
|
|
39
|
-
toneMapping?: ToneMapping;
|
|
40
|
-
/**
|
|
41
|
-
* Whether to read the gain map (jhgm box) of JPEG XL animations into {@link Image.gainMap} of every frame, like
|
|
42
|
-
* `gainMap` of {@link Image.decode}. Default: `true`
|
|
43
|
-
*/
|
|
44
|
-
gainMap?: boolean;
|
|
20
|
+
width?: number;
|
|
21
|
+
/** The canvas height in pixels, like `width`. Default: the frames' bottom edge (the largest `yOffset + height`) */
|
|
22
|
+
height?: number;
|
|
45
23
|
}
|
|
46
24
|
/** The options all animation encoders have */
|
|
47
|
-
export interface AnimationEncodeOptions {
|
|
48
|
-
/** Metadata to include, see {@link Metadata} */
|
|
49
|
-
metadata?: Metadata;
|
|
25
|
+
export interface AnimationEncodeOptions extends EncodeOptions {
|
|
50
26
|
/**
|
|
51
27
|
* Whether to store each frame as the area that changed since the frame before and merge identical frames, which
|
|
52
28
|
* usually makes files a lot smaller. The file shows the same animation either way, but only decodes to the same
|
|
@@ -57,22 +33,22 @@ export interface AnimationEncodeOptions {
|
|
|
57
33
|
/** Options of {@link Animation.encodeWebP} */
|
|
58
34
|
export interface WebPAnimationEncodeOptions extends AnimationEncodeOptions {
|
|
59
35
|
/**
|
|
60
|
-
* Lossy
|
|
61
|
-
*
|
|
62
|
-
* up to 3 per channel at quality 85, 1 at 100)
|
|
36
|
+
* Lossy compression quality (0-100): higher values usually preserve more detail but make larger files. Without
|
|
37
|
+
* this option, frames are encoded losslessly
|
|
63
38
|
*/
|
|
64
39
|
quality?: number;
|
|
65
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Compression effort (0-6): higher effort can make smaller files but takes longer, see
|
|
42
|
+
* {@link WebPEncodeOptions.effort}. Default: `2`
|
|
43
|
+
*/
|
|
66
44
|
effort?: number;
|
|
67
|
-
/**
|
|
45
|
+
/** For lossy frames, improve color detail around sharp edges. Default: `false` */
|
|
68
46
|
sharpYuv?: boolean;
|
|
69
|
-
/**
|
|
47
|
+
/** For lossy frames, the quality of the transparency channel (0-100). Default: `100` */
|
|
70
48
|
alphaQuality?: number;
|
|
71
49
|
}
|
|
72
|
-
/** Options of {@link Animation.encodeGIF} */
|
|
73
|
-
export interface
|
|
74
|
-
/** 1-100, scales the palette size from 8 colors (1) to 256 colors (90 and above). Default: `95` */
|
|
75
|
-
quality?: number;
|
|
50
|
+
/** Options of {@link Animation.encodeGIF} and {@link Animation.gifEncoder}: the palette of {@link GIFEncodeOptions} and the animation options */
|
|
51
|
+
export interface GIFAnimationEncodeOptions extends GIFEncodeOptions, AnimationEncodeOptions {
|
|
76
52
|
}
|
|
77
53
|
/** Options of {@link Animation.encodeAPNG} */
|
|
78
54
|
export interface APNGEncodeOptions extends AnimationEncodeOptions {
|
|
@@ -80,60 +56,54 @@ export interface APNGEncodeOptions extends AnimationEncodeOptions {
|
|
|
80
56
|
compression?: number;
|
|
81
57
|
}
|
|
82
58
|
/**
|
|
83
|
-
* An animation: frames ({@link Animation.frames}) that can be decoded from and encoded to GIF, APNG and WebP.
|
|
84
|
-
*
|
|
85
|
-
* The animation itself is an array of its frames too (`animation[0]`, `animation.map(...)`), which is deprecated: in 4.0
|
|
86
|
-
* it won't extend `Array` anymore, use {@link Animation.frames} instead. Array methods like map and filter return
|
|
87
|
-
* plain arrays.
|
|
59
|
+
* An animation: frames ({@link Animation.frames}) that can be decoded from and encoded to GIF, APNG and WebP. It can be
|
|
60
|
+
* iterated (`for (const frame of animation)`), and its `length` is the number of frames.
|
|
88
61
|
*/
|
|
89
|
-
export declare class Animation
|
|
90
|
-
/**
|
|
91
|
-
* How many times to repeat the animation (`Infinity` = forever, 0 = play once, 1 = play twice, ...). `-1` still
|
|
92
|
-
* means forever, it will be removed in 4.0, when `Infinity` is what animations that loop forever have (animations
|
|
93
|
-
* that loop forever have `-1` until then, also the decoded ones)
|
|
94
|
-
*/
|
|
95
|
-
loopCount: number;
|
|
62
|
+
export declare class Animation {
|
|
96
63
|
/**
|
|
97
64
|
* Creates a new animation
|
|
98
65
|
* @param frames The frames to create the animation from
|
|
99
|
-
* @param options
|
|
66
|
+
* @param options The canvas size and the loop count, see {@link AnimationCanvasOptions}
|
|
100
67
|
*/
|
|
101
|
-
constructor(frames: Frame[], options?:
|
|
68
|
+
constructor(frames: Frame[], options?: AnimationCanvasOptions);
|
|
102
69
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* @param loopCount How many times to repeat the animation (`Infinity` = forever, 0 = play once, 1 = play twice, ...)
|
|
106
|
-
* @deprecated Pass {@link AnimationOptions} instead, the positional arguments will be removed in 4.0
|
|
70
|
+
* How many times to repeat the animation: `Infinity` (the default) loops forever, 0 plays once, 1 plays twice, ...
|
|
71
|
+
* Other values throw, see {@link AnimationOptions.loopCount}, and the loop count stays as it was
|
|
107
72
|
*/
|
|
108
|
-
|
|
73
|
+
get loopCount(): number;
|
|
109
74
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
75
|
+
* Replaces the loop count (see {@link Animation.loopCount}). Anything else than `Infinity` or an integer from 0
|
|
76
|
+
* throws, and the count stays as it was
|
|
77
|
+
* @param value The new loop count
|
|
112
78
|
*/
|
|
113
|
-
|
|
79
|
+
set loopCount(value: number);
|
|
80
|
+
/**
|
|
81
|
+
* The animation's frames as a frozen array. The frames themselves are mutable; assign a new array to replace the
|
|
82
|
+
* list
|
|
83
|
+
*/
|
|
84
|
+
get frames(): readonly Frame[];
|
|
114
85
|
/**
|
|
115
86
|
* Replaces the animation's frames
|
|
116
|
-
* @param frames The new frames (copied into the animation
|
|
87
|
+
* @param frames The new frames (copied into the animation; the array itself isn't kept)
|
|
88
|
+
*/
|
|
89
|
+
set frames(frames: readonly Frame[]);
|
|
90
|
+
/** The number of frames */
|
|
91
|
+
get length(): number;
|
|
92
|
+
/** Iterates over the frames, `for (const frame of animation)` */
|
|
93
|
+
[Symbol.iterator](): IterableIterator<Frame>;
|
|
94
|
+
/**
|
|
95
|
+
* The canvas width: the one given to the constructor, the decoded file's, or the one {@link Animation.resize} and
|
|
96
|
+
* {@link Animation.crop} set; else the frames' right edge
|
|
117
97
|
*/
|
|
118
|
-
set frames(frames: Frame[]);
|
|
119
|
-
/** The animation's width */
|
|
120
98
|
get width(): number;
|
|
121
|
-
/** The
|
|
99
|
+
/** The canvas height, like {@link Animation.width}; else the frames' bottom edge */
|
|
122
100
|
get height(): number;
|
|
101
|
+
/** Clones the animation: its frames (with their pixels), canvas size and loop count */
|
|
102
|
+
clone(): Animation;
|
|
123
103
|
/** The animation's duration (in ms) */
|
|
124
104
|
get duration(): number;
|
|
125
105
|
/** A short description for debugging, e.g. `Animation<64x64x1000ms>` */
|
|
126
106
|
toString(): string;
|
|
127
|
-
/**
|
|
128
|
-
* Returns a new animation of the same class containing a range of this one's frames
|
|
129
|
-
* (same semantics as Array.prototype.slice)
|
|
130
|
-
* @param start The index of the first frame (negative counts from the end). Default: `0`
|
|
131
|
-
* @param end The index after the last frame (negative counts from the end). Default: the frame count
|
|
132
|
-
* @deprecated Use `new Animation(animation.frames.slice(start, end), animation.loopCount)`: in 4.0 animations
|
|
133
|
-
* aren't arrays anymore
|
|
134
|
-
* @group Deprecated
|
|
135
|
-
*/
|
|
136
|
-
slice(start?: number, end?: number): this;
|
|
137
107
|
/**
|
|
138
108
|
* Resizes the animation to the given dimensions, scaling every frame and its offsets proportionally.
|
|
139
109
|
* Pass {@link ResizeToOptions} with only a width or a height to keep the aspect ratio.
|
|
@@ -142,15 +112,6 @@ export declare class Animation extends Array<Frame> {
|
|
|
142
112
|
* @param options See {@link ResizeOptions}
|
|
143
113
|
*/
|
|
144
114
|
resize(width: number, height: number, options?: ResizeOptions): this;
|
|
145
|
-
/**
|
|
146
|
-
* Resizes the animation to the given dimensions, scaling every frame and its offsets proportionally.
|
|
147
|
-
* Pass {@link ResizeToOptions} with only a width or a height to keep the aspect ratio.
|
|
148
|
-
* @param width The new width
|
|
149
|
-
* @param height The new height
|
|
150
|
-
* @param mode The resizing mode to use. Default: {@link ResizeModes.BILINEAR}
|
|
151
|
-
* @deprecated Pass {@link ResizeOptions} with `mode` instead, the positional mode will be removed in 4.0
|
|
152
|
-
*/
|
|
153
|
-
resize(width: number, height: number, mode?: ResizeMode): this;
|
|
154
115
|
/**
|
|
155
116
|
* Resizes the animation, scaling every frame and its offsets proportionally: to the given width or height (the
|
|
156
117
|
* other side keeps the aspect ratio), or to both
|
|
@@ -158,22 +119,63 @@ export declare class Animation extends Array<Frame> {
|
|
|
158
119
|
*/
|
|
159
120
|
resize(options: ResizeToOptions): this;
|
|
160
121
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
* @param
|
|
122
|
+
* Crops the canvas to the given region: the frames move with it and are cut to the new canvas. The region is
|
|
123
|
+
* clipped to the canvas, so the result can be smaller than the requested size
|
|
124
|
+
* @param x The x offset (0-based)
|
|
125
|
+
* @param y The y offset (0-based)
|
|
126
|
+
* @param width The new canvas width
|
|
127
|
+
* @param height The new canvas height
|
|
128
|
+
*/
|
|
129
|
+
crop(x: number, y: number, width: number, height: number): this;
|
|
130
|
+
/**
|
|
131
|
+
* Scales the animation by a factor: every frame and its offsets, and the canvas
|
|
132
|
+
* @param factor The factor
|
|
133
|
+
* @param options See {@link ResizeOptions}
|
|
134
|
+
*/
|
|
135
|
+
scale(factor: number, options?: ResizeOptions): this;
|
|
136
|
+
/**
|
|
137
|
+
* Trims the canvas: removes the borders of one color around what any frame shows (in the composited animation),
|
|
138
|
+
* like {@link Image.trim}. The frames keep their pixels, the canvas is cropped like {@link Animation.crop}
|
|
139
|
+
* @param options The color (by default the top left pixel of the first frame) and the tolerance, see
|
|
140
|
+
* {@link TrimOptions}
|
|
141
|
+
*/
|
|
142
|
+
trim(options?: TrimOptions): this;
|
|
143
|
+
/**
|
|
144
|
+
* Rotates the animation clockwise, like {@link Image.rotate}: the frames become full canvas frames of the
|
|
145
|
+
* composited animation (a partial frame turned by any angle wouldn't cover a rectangle anymore), each one rotated,
|
|
146
|
+
* and the canvas takes their size
|
|
147
|
+
* @param angle The angle in degrees, clockwise
|
|
148
|
+
* @param options See {@link RotateOptions}
|
|
149
|
+
*/
|
|
150
|
+
rotate(angle: number, options?: RotateOptions): this;
|
|
151
|
+
/**
|
|
152
|
+
* Transforms the animation with an affine transform, like {@link Image.transform}: the frames become full canvas
|
|
153
|
+
* frames of the composited animation, each one transformed (by default around the canvas' middle), and the canvas
|
|
154
|
+
* takes their size
|
|
155
|
+
* @param matrix The six values [a, b, c, d, e, f]
|
|
156
|
+
* @param options See {@link TransformOptions}
|
|
157
|
+
*/
|
|
158
|
+
transform(matrix: AffineTransform, options?: TransformOptions): this;
|
|
159
|
+
/**
|
|
160
|
+
* Adds a shadow behind what the animation shows, like {@link Image.dropShadow}: the frames become full canvas
|
|
161
|
+
* frames of the composited animation, each one with its shadow, and the canvas grows with them
|
|
162
|
+
* @param options See {@link ShadowOptions}
|
|
163
|
+
*/
|
|
164
|
+
dropShadow(options?: ShadowOptions): this;
|
|
165
|
+
/**
|
|
166
|
+
* Draws an outline around what the animation shows, like {@link Image.outline}: the frames become full canvas
|
|
167
|
+
* frames of the composited animation, each one outlined, and the canvas grows with them
|
|
168
|
+
* @param options See {@link OutlineOptions}
|
|
166
169
|
*/
|
|
167
|
-
|
|
170
|
+
outline(options?: OutlineOptions): this;
|
|
168
171
|
/**
|
|
169
172
|
* Encodes the animation as GIF. Like all encoders, it stores each frame as the area that changed since the frame
|
|
170
173
|
* before and merges identical frames (unless the `optimize` option is false), so the file decodes to what the
|
|
171
174
|
* animation shows, but not necessarily to the same frames. Semi-transparent pixels become opaque or transparent
|
|
172
175
|
* after the frames are composited
|
|
173
|
-
* @param
|
|
174
|
-
* @deprecated Pass {@link GIFEncodeOptions} instead, the positional arguments will be removed in 4.0
|
|
176
|
+
* @param options See {@link GIFAnimationEncodeOptions}
|
|
175
177
|
*/
|
|
176
|
-
encodeGIF(
|
|
178
|
+
encodeGIF(options?: GIFAnimationEncodeOptions): Promise<Uint8Array<ArrayBuffer>>;
|
|
177
179
|
/**
|
|
178
180
|
* Encodes the animation as APNG (animated PNG, lossless and with full alpha). Viewers without APNG support show
|
|
179
181
|
* the first frame. Each frame is stored as the area that changed since the frame before, identical frames are
|
|
@@ -181,23 +183,14 @@ export declare class Animation extends Array<Frame> {
|
|
|
181
183
|
* necessarily decode to the same frames
|
|
182
184
|
* @param options See {@link APNGEncodeOptions}
|
|
183
185
|
*/
|
|
184
|
-
encodeAPNG(options?: APNGEncodeOptions): Promise<Uint8Array
|
|
185
|
-
/**
|
|
186
|
-
* Encodes the animation as APNG (animated PNG, lossless and with full alpha). Viewers without APNG support show
|
|
187
|
-
* the first frame. Each frame is stored as the area that changed since the frame before, identical frames are
|
|
188
|
-
* merged (unless the `optimize` option is false): the file shows exactly the same animation, but doesn't
|
|
189
|
-
* necessarily decode to the same frames
|
|
190
|
-
* @param compression The zlib compression level (0-9), higher is smaller but slower. Default: `4`
|
|
191
|
-
* @deprecated Pass {@link APNGEncodeOptions} instead, the positional arguments will be removed in 4.0
|
|
192
|
-
*/
|
|
193
|
-
encodeAPNG(compression?: number): Promise<Uint8Array>;
|
|
186
|
+
encodeAPNG(options?: APNGEncodeOptions): Promise<Uint8Array<ArrayBuffer>>;
|
|
194
187
|
/**
|
|
195
188
|
* Encodes the animation as animated WebP, lossless or (with a quality) lossy. Each frame is stored as the area that
|
|
196
189
|
* changed since the frame before, identical frames are merged (unless the `optimize` option is false): the file
|
|
197
190
|
* shows the same animation, but doesn't necessarily decode to the same frames
|
|
198
191
|
* @param options See {@link WebPAnimationEncodeOptions}
|
|
199
192
|
*/
|
|
200
|
-
encodeWebP(
|
|
193
|
+
encodeWebP(options?: WebPAnimationEncodeOptions): Promise<Uint8Array<ArrayBuffer>>;
|
|
201
194
|
/**
|
|
202
195
|
* An encoder that makes an animated WebP a frame at a time, like {@link Animation.encodeWebP} (the same file),
|
|
203
196
|
* without keeping the frames in memory: `await encoder.add(frame)` for each frame (a {@link Frame}, or an image
|
|
@@ -212,9 +205,9 @@ export declare class Animation extends Array<Frame> {
|
|
|
212
205
|
* without keeping the frames in memory: `await encoder.add(frame)` for each frame, then `await encoder.finish()`
|
|
213
206
|
* @param width The canvas width
|
|
214
207
|
* @param height The canvas height
|
|
215
|
-
* @param options See {@link
|
|
208
|
+
* @param options See {@link GIFAnimationEncodeOptions}, and {@link AnimationOptions.loopCount}
|
|
216
209
|
*/
|
|
217
|
-
static gifEncoder(width: number, height: number, options?:
|
|
210
|
+
static gifEncoder(width: number, height: number, options?: GIFAnimationEncodeOptions & AnimationOptions): AnimationEncoder;
|
|
218
211
|
/**
|
|
219
212
|
* An encoder that makes an APNG a frame at a time, like {@link Animation.encodeAPNG} (the same file), keeping the
|
|
220
213
|
* frames only compressed (the pixel format depends on all of them): `await encoder.add(frame)` for each frame,
|
|
@@ -227,14 +220,7 @@ export declare class Animation extends Array<Frame> {
|
|
|
227
220
|
/**
|
|
228
221
|
* Decodes an animated GIF, APNG, WebP or JPEG XL into fully composited frames (still images become a single frame)
|
|
229
222
|
* @param input The binary data to decode
|
|
230
|
-
* @param options See {@link
|
|
231
|
-
*/
|
|
232
|
-
static decode(input: BinaryData, options?: AnimationDecodeOptions): Promise<Animation>;
|
|
233
|
-
/**
|
|
234
|
-
* Decodes an animated GIF, APNG, WebP or JPEG XL into fully composited frames (still images become a single frame)
|
|
235
|
-
* @param input The binary data to decode
|
|
236
|
-
* @param onlyExtractFirstFrame Whether to stop decoding after the first frame
|
|
237
|
-
* @deprecated Pass {@link AnimationDecodeOptions} instead, the positional arguments will be removed in 4.0
|
|
223
|
+
* @param options See {@link DecodeOptions}
|
|
238
224
|
*/
|
|
239
|
-
static decode(input: BinaryData,
|
|
225
|
+
static decode(input: BinaryData, options?: DecodeOptions): Promise<Animation>;
|
|
240
226
|
}
|