Node / Gif Animation · guide
Watermark & text overlay
Current Apexify.js 6.0.0 documentation for Watermark & text overlay.
Overlays are applied after the frame raster is drawn onto the GIF output canvas and before encoder.addFrame.
Watermarks
Global and per-frame watermarks use the same GIFWatermarkSpec:
url is a GIFFrameSource, despite the historical field name. It can therefore be local bytes, a path/data image, or a permitted remote URL. Remote watermark sources use Apexify's central network policy and byte limits.
Global watermark
The global image is resolved once for the operation and reused through a bounded cache rather than being decoded independently for every frame.
Per-frame watermark
A frame-level watermark replaces the global watermark specification for that frame. enable: false suppresses watermarking for the frame even when a global watermark exists.
Sizing and placement
scalescales both native dimensions and cannot be combined with explicitwidth/height.widthonly preserves native aspect ratio while deriving height.heightonly preserves native aspect ratio while deriving width.- both
widthandheightuse the explicit dimensions. positiondefaults tobottom-left.margindefaults to10pixels for position-based placement.- explicit
x/yoverride the derived position coordinate independently. opacitydefaults to1.
textOverlay uses the main text renderer
Phase 7 no longer uses a hard-coded ${fontSize}px Arial fillText shortcut. GIFOptions.textOverlay is based on the normal TextProperties model and is rendered through EnhancedTextRenderer.
That means GIF text overlays support the same core styling model used by createText, including nested font/fill/layout/placement/effects/decorations, custom font paths, gradients, strokes, shadows/glow, wrapping, rotation, and curved text where the underlying TextProperties feature supports it.
x and y are optional only for the GIF overlay convenience API and default to 10 and 30. fontColor remains a compatibility alias for the text color.
Text-overlay validation uses the same authoritative text-property validation path as other Apexify rendering surfaces.