An integer representing the GIF image's width, between 1
and 65536
.
An integer representing the GIF image's height, between 1
and 65536
.
Readonly
heightThe GIF image's height, between 1
and 65536
.
Readonly
widthThe GIF image's width, between 1
and 65536
.
Adds the next GIF frame. The frame is not written immediately, but is actually deferred until the next frame is received so that timing data can be inserted. Calling GifEncoder.finish will flush all frames.
The image data to add into the next frame.
Creates a readable stream and pushes it to the encoder's GifEncoder.readableStreams readable streams.
The new readable stream.
Uses an existing readable stream and pushes it to the encoder's GifEncoder.readableStreams readable streams.
The readable stream to use.
The given readable stream.
Creates a write stream.
Optional
options: EncoderOptionsThe options for the write stream.
A Duplex.
Sets the GIF frame disposal code for the last added frame and any subsequent frames.
Defaults to one of the following values:
0
: If transparent
is set2
: OtherwiseThe disposal code.
Sets the quality of color quantization (conversion of images to the maximum 256 colors allowed by the GIF
specification). Lower values (minimum
= 1) produce better colors, but slow processing significantly. 10
is
the default, and produces good color mapping at reasonable speeds. Values greater than 20 do not yield
significant improvements in speed.
A number between 1
and 30
.
Sets the transparent color for the last added frame and any subsequent frames. Since all colors are subject to modification in the quantization process, the color in the final palette for each frame closest to the given color becomes the transparent color for that frame. May be set to null to indicate no transparent color.
The color to be set in transparent pixels.
Constructs the GIF encoder.