extend

Extend layer. Adds margins to a layer or crops the layer rectangle.

extend=left,top,right,bottom

extendN=leftN,topN,rightN,bottomN

left,top,bottom,right

Number of pixels to add to (or remove from, if the value is negative) the left, top, right, and bottom edge of the layer rect (int, int, int, int).

leftN,topN,bottomN,rightN

Amount of space to add to (or remove from, if the value is negative) the left, top, right, and bottom edge of the layer rect, expressed as normalized amounts relative to the size of the original layer rect (real, real, real, real).

extend= is applied to the layer after the image is cropped (crop=) and all layer transforms, including rotate=, have been applied.

The extended area is filled with bgColor=, or, if not specified, remains transparent.

Argument values for extendN= are normalized relative to the size of the layer rect after layer transforms, including rotate= have been applied.

Properties

Layer attribute. Applies to layer 0 if layer=comp. Ignored by effect layers.

Default

extend=0,0,0,0, for no change of the layer rectangle.

Examples

Crop an image and then add a 5 pixel wide, red border:

…&cropN=.2,.3,.8,.9&extend=5,5,5,5&bgColor=255,0,0&…

Scale an image to 200 pixels width and add title text into a 30 pixel margin above the image.

Note that the height of the composite image varies depending on the aspect ratio of the image.

http://server/myRootId/myImageId?size=200,0&extend=0,30,0,0&origin=0,0 layer=1&text=title-text&origin=0,0