Skip to main content

Interface: PadInput

Defined in: type/PadInput.ts:11

Add pixels to the edge of an image. Notes

  • By default padding applies a background color of white. See bg-color to change that.
  • If the source image contains a transparent background and the output image also contains transparency, the padding will be made up of transparent pixels.
  • When using pad and canvas at the same time, pad will be ignored.
  • Values can be specified using CSS style shorthand values. (see CSS Margin or CSS Padding for more examples).
  • CSS shorthand allows for all edges to be specified in one property.
  • Any fractional pixel measurements will be rounded to the nearest whole pixel.

Properties

bottom?

optional bottom?: number

Defined in: type/PadInput.ts:17

Bottom - Pixels or Percentage - Default=0


left?

optional left?: number

Defined in: type/PadInput.ts:19

Left - Pixels or Percentage - Default=0


optional right?: number

Defined in: type/PadInput.ts:15

Right - Pixels or Percentage - Default=0


top?

optional top?: number

Defined in: type/PadInput.ts:13

Top - Pixels or Percentage - Default=0