image_watermark
Overlay a semi-transparent watermark band on an image at a specified position.
Parameters
- pathstringone of
pathorsource_key - Input image path (supports
${ctx.key}interpolation) - source_keystringone of
pathorsource_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
pngorjpeg/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>_success—trueon 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