Treat deck image
treat_deck_imageCrop an uploaded image to 16:9, apply a palette-locked duotone, grain, and optional contrast scrim for deck variant backgrounds.
Instructions
Make an image tahta-grade for a deck's variant (editor+): crop to 16:9, apply a scheme-aware duotone (palette-lock), grain, and an optional contrast scrim. Upload the source with upload_attachment first, then pass its attachment_id; the treated JPEG is saved as a new attachment and returned with a ready-to-place snippet for a bg:/image: slot. This is the tahta-imagine treat step — a FALLBACK for off-palette or reused images; prefer rich on-palette images raw, and never duotone (mode=duotone) a real-colour focal subject — use mode=none for those. See the imagery capability module (deck_authoring_guide module="imagery").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | id of the deck page the source image is attached to (the treated result is attached here too) | |
| mode | No | duotone (palette-lock to the variant, default) or none (crop+grain only, keep the image raw) | |
| scrim | No | optional contrast scrim: left or bottom (for text over the image); omit for none | |
| variant | No | tahta variant to treat for; omit to use the deck's own variant | |
| attachment_id | Yes | id of an existing attachment ON THIS PAGE to treat (upload the source first with upload_attachment) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| note | Yes | ||
| variant | Yes | ||
| markdown | Yes |