image_flip
Flip a single image horizontally or vertically.
Parameters
- pathstringone of
pathorsource_key - Source image path
- source_keystringone of
pathorsource_key - Context key containing a source path/object
- output_pathstringrequired
- Destination image path
- directionstringdefault "horizontal"
horizontal,vertical, orboth- formatstringdefault inferred / png
pngorjpeg/jpg- output_keystringdefault "flipped_image"
- Prefix for output values
Context Output
<output_key>— output file path<output_key>_direction— chosen direction<output_key>_width/<output_key>_height<output_key>_format<output_key>_success
Example
local flow = Flow.new("image_flip_demo")
flow:step("flip", nodes.image_flip({
path = "examples/fixtures/ironflow-sample.png",
direction = "vertical",
output_path = "output/sample_front_flip.png",
output_key = "flipped"
}))
flow:step("log", nodes.log({
message = "Flipped image file: ${ctx.flipped}"
})):depends_on("flip")
return flow