Search Documentation

pad Padding

Pads the image by the number of pixels specified. Must be a positive integer.

If the image is requested without a specified width and height, padding will be added to the dimensions of the image. If the image is cropped or resized, the image (including the padding) will be sized to fit within the requested dimensions.

If bg is set, the padded area will be filled in with its value; otherwise it will be transparent if the output format allows transparency, and white if not.