photo_add_border
Add Border — Add a solid-colour border around an image, keeping the format it arrived in. [category: photo]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | JPG, PNG or WebP. Max 25 MB. The output keeps the input format. The type is read from the file's own bytes, not from its name. | |
| size | No | How thick the border is, in pixels, on all four sides. Out-of-range values are pulled back to the nearest allowed value rather than refused. 0 adds no border, but it is NOT a pass-through: the picture is still decoded and written out again (a JPEG is re-encoded at quality 92), and an EXIF-rotated phone photo comes back physically rotated with its orientation tag cleared. | |
| color | No | A hex colour (#rgb, #rgba, #rrggbb or #rrggbbaa) or one of these 35 names — a hand-picked set, not the whole CSS list, so lightblue and darkgreen are refused: black, silver, gray, grey, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua, cyan, magenta, orange, pink, brown, beige, ivory, gold, tan, khaki, crimson, indigo, violet, salmon, turquoise, lavender, plus none and transparent, which still widen the picture by the border size on every side but fill those new pixels with see-through rather than a visible frame. Anything else is refused rather than quietly falling back. A see-through colour needs a PNG or WebP input — on a JPEG it is refused, because JPEG cannot hold transparency and the border would come out black. | #000000 |