Node / Gif Animation · guide
Input frames (GIFInputFrame)
Current Apexify.js 6.0.0 documentation for Input frames (GIFInputFrame).
Use GIFInputFrame[] when not using options.onStart. The list must be non-empty, must stay within the configured GIF frame/resource limits, and each frame must select exactly one raster source.
Frame shape
Required source rule
Each frame must provide exactly one of:
bufferbackground
Providing neither is invalid. Providing both is also invalid. The two names are retained for API compatibility; both feed the same Phase 7 source-resolution pipeline.
Duration
duration is optional. Resolution is:
frame.duration ?? options.delay ?? 100 milliseconds.
A provided duration must be finite and within the GIF delay range. GIF timing is encoded in hundredths of a second, so the encoder rounds millisecond values to 10 ms units.
Supported source forms
buffer / background accept:
BufferorUint8Arrayraster bytes- filesystem path strings
- supported base64
data:image/...URLs http:/https:URLs allowed by the configured network policyURLobjects, including supported file/remote URLs
Remote data is resolved through Apexify's shared media layer. Protocol/host restrictions, SSRF protections, redirect handling, timeouts, remote-byte limits, and global remote concurrency policy therefore apply automatically.
For ordinary frame arrays, Apexify may resolve several frames ahead, but the queue is bounded by the central batch/network concurrency limits and preserves input order. It does not launch an unconstrained Promise.all over the whole animation.
Per-frame remote payloads use the central transport without retaining every one-use frame in the shared media cache.
Per-frame overrides
| Field | Purpose |
|---|---|
dispose | GIF disposal method for this frame; overrides options.defaultDispose. |
transparentColor | Per-frame chroma key. null explicitly disables transparency for this frame. |
watermark | Per-frame watermark. enable: false suppresses even a configured global watermark for that frame. |
Frame-local transparency/disposal state is reset deterministically before every addFrame, so one frame's override does not leak into the next frame.
Sizing
All frames are composited onto the configured GIF output canvas (width × height, default 1200 × 1200). A source whose dimensions differ from the output is stretched to the output dimensions.
When skipResizeWhenDimensionsMatch is omitted or true, an exact-size source is drawn directly. false forces the explicit sized draw path even when dimensions already match; it does not change the public stretch-to-output sizing rule.
Example
For remote examples, the host/protocol must be permitted by your Apexify runtime network configuration.