interface export
GIFOptions
Published interface export GIFOptions.
apexify.jsCURRENTnode22node24node26
Source: lib-next/types/gif.ts (opens in a new tab)Signature
export interface GIFOptions {
outputFormat: GIFOutputFormat;
outputFile?: string;
/** Attachment filename; `.gif` is appended when omitted. */
attachmentName?: string;
width?: number;
height?: number;
/** -1 = play once, 0 = loop forever, positive values = finite repeat count. */
repeat?: number;
/** Quantizer sample interval 1..30; lower is higher quality/slower. Default 10. */
quality?: number;
/** Default frame delay in milliseconds. GIF timing is rounded to 10ms units. */
delay?: number;
watermark?: GIFWatermarkSpec;
transparentColor?: number | string | null;
defaultDispose?: GIFDisposalMethod;
textOverlay?: GIFTextOverlaySpec;
/** Frames are stretched to the output dimensions; this only skips redundant scaling for exact-size frames. */
skipResizeWhenDimensionsMatch?: boolean;
/**
* Generated-frame mode. Returning an AsyncIterable is the memory-bounded streaming path:
* one yielded frame is resolved, decoded, drawn and encoded before the next is requested.
*/
onStart?: (frameCountHint: number, painter: unknown) => Promise<GIFEncodedFrame[] | AsyncIterable<GIFEncodedFrame>>;
/** Maximum generated frames and the hint passed to onStart. The runtime maxGifFrames limit is always enforced. */
frameCount?: number;
/** Optional generated-mode duration bound in milliseconds, converted to a frame bound using `delay`. */
duration?: number;
onEnd?: (finalFrameBuffer: Buffer, painter: unknown) => Promise<Buffer | undefined>;
/** Cancels further frame pulls, media requests, and encoding work between encoder frame commits. */
signal?: AbortSignal;
}Related APIs
No explicit related API metadata.