ImagePad¶
Pads an image on each side. A single extent pads all four sides, with black as the default fill:
Per-side extents are given as {{left, right}, {bottom, top}}:
A third argument gives the fill: a constant value,
or one of the edge-extension methods
"Fixed", "Periodic" and "Reflected".
$ wo 'Round[ImageData[ImagePad[Image[{{0.2, 0.4}}], 1, "Fixed"]], 0.001]'
{{0.2, 0.2, 0.4, 0.4}, {0.2, 0.2, 0.4, 0.4}, {0.2, 0.2, 0.4, 0.4}}
A negative extent trims that side instead of growing it.