IronFlowDocs

image_watermark

Overlay a semi-transparent watermark band on an image at a specified position.

Parameters

pathstringone of path or source_key
Input image path (supports ${ctx.key} interpolation)
source_keystringone of path or source_key
Context key containing a source path/object
output_pathstringrequired
Output image path
textstringdefault "watermark"
Watermark text (supports ${ctx.key} interpolation)
positionstringdefault "bottom-right"
One of bottom-right, bottom-left, top-right, top-left, center
opacitynumberdefault 0.5
Opacity of the watermark band (0.0 - 1.0)
formatstringdefault inferred / png
png or jpeg/jpg
output_keystringdefault "image_watermark"
Prefix for output values

Context Output

  • <output_key>_path — output file path
  • <output_key>_text — the watermark text applied
  • <output_key>_successtrue on success

Example

local flow = Flow.new("image_watermark_demo")

flow:step("watermark", nodes.image_watermark({
    path = "examples/fixtures/ironflow-sample.png",
    output_path = "output/photo_watermarked.png",
    text = "CONFIDENTIAL",
    position = "bottom-right",
    opacity = 0.4
}))

flow:step("log", nodes.log({
    message = "Watermarked: ${ctx.image_watermark_path}"
})):depends_on("watermark")

return flow

IronFlow documentation

Find the next step

Type a keyword to search the documentation.

to move · Enter to open · Esc to close