pad

Add some space surrounding the image or to selected sides of the image

parameters

  • insets: size (dimension values) of the border (top, right, bottom, left). Default is 0.

  • fill color: color value, color to fill the space

JSON object properties

  • top: the amount of top inset (above the image)

  • right: the amount of right inset (on the right of the image)

  • bottom: the amount of bottom inset (below the image)

  • left: the amount of left inset (on the left of the image)

  • border: a common default value for top, right, bottom or left inset (default value is 0)

  • background (or color): color to fill the space. Only classic color or $dom type color is allowed.

simplified syntax parameters

  • prefix t: the amount of top inset (above the image)

  • prefix r: the amount of right inset (on the right of the image)

  • prefix b: the amount of bottom inset (below the image)

  • prefix l: the amount of left inset (on the left of the image)

  • prefix bd: a common default value for top, right, bottom or left inset (default value is 0)

  • prefix bg: the color to fill space

array type parameters

The possible arrays are:

  • [color, top, right, bottom, left]

  • [color, top & bottom, right & left]

  • [color, top, right & left, bottom]

  • [color, border]

  • [top, right, bottom, left]

  • [top & bottom, right & left]

  • [top, right & left, bottom]

  • [border]

Example 1 - Border around

{ "pad": ["SandyBrown",40] }

Maldives: W400×H225

Maldives: W480×H305

Simplified syntax: bd_40,bg_sandybrown,c_pad

Example 2 - Selected borders

{ "pad": ["SandyBrown",40,0] }

Maldives: W400×H225

Maldives: W400×H225

Simplified syntax: t_40,b_40,bg_sandybrown,c_pad

Example 3 - Different sizes

{ "pad": ["White",10,10,"20%"] }

Maldives: W400×H225

Maldives: W420×H280

Simplified syntax: bd_10,b_20p,bg_white,c_pad

Example 4 - Different colors

Chain several commands in a row:

 

Maldives: W400×H225

Maldives: W424×H249

Simplified syntax: bd_1,bg_black,c_pad,bd_10,bg_white,c_pad,bd_1,bg_black,c_pad