Sepia Watermark + Frame Example
This example applies a sepia tone to the uploaded image, overlays a watermark in the corner, and adds a white frame. It demonstrates how to chain multiple processors using shared memory paths.
Demonstrates
- Chaining multiple processors using
mem/
paths - Using the
color_transform
processor with aneffect
- Compositing a watermark with anchors and opacity
- Referencing an image from the account store (
account/watermark.png
) - Drawing a border using the
frame
processor withcomposite: True
- Final output written to
output/output.png
Definition
- processor:
processor: "color_transform"
inputs:
source: "input/input.png" # upload
params:
effect: "sepia"
intensity: "1.0"
outputs:
target: "mem/work.png" # save to memory
- processor:
processor: "composite"
inputs:
background: "mem/work.png" # load from previous
overlay: "account/watermark.png"
params:
background_anchor: "rel(1.0,1.0)" # bottom right
overlay_anchor: "rel(1.0,1.0)" # bottom right
width: 50 # size in pixels
opacity: 0.5 # 50% transparency
outputs:
target: "mem/work.png" # update memory
- processor:
processor: "frame"
inputs:
source: "mem/work.png" # load from previous
params:
composite: "True"
size: 10
color: "#FFFFFF"
outputs:
target: "output/output.png" # final output.