GIMP Script-fu

Artifact Content

Artifact f2110648112ac3091e5a05979923a46710dd8ddf:

Wiki page [sg-extend-layer] by saulgoode 2013-08-28 14:45:38.
D 2013-08-28T14:45:38.176
L sg-extend-layer
P 52e6fc5b3ea996bf252f8e88fcad0a2cc75af0d1
U saulgoode
W 1690
<dt><b>Command:</b> <dd>Extend to Image Size</dd></dt>
<dt><b>Menu:</b> <dd>"<Image>/Layer/Extend to Image Size"</dd></dt>
<dt><b>PDB Name:</b> <dd>script-fu-sg-extend-layer</dd></dt>
<dt><b>Download:</b> <dd>[|sg-extend-layer.scm] (after the page appears, click on the "Download" command)</dd></dt>
<dt><b>License:</b> <dd>[copyright|GPLv2+]</dd></dt>

<dt><b>Description:</b> <dd>This script will scale the boundaries of the current layer to fit the image size. If there is no selection when the script is run, the entire layer is scaled to the image size. If there is a selection present then that selection is protected from scaling and only the portion of the layer outside the selection will be scaled. (As a special case, if the entire layer is selected then the 1-pixel edge around the periphery of the layer will be extended to the image size.)

The script is generally intended for extending the background behind a subject without modifying the subject itself.

As an example, when "Extend to Image Size" is applied on the following image, the region between the selection (the black and white dashed line) and the layer edge (the black and yellow dashed line) will be scaled outwards to fill the image (the gray checkerboard). The selected region will not be scaled (or moved). 

<center><img src="" />

The following result will be produced.

<center><img src="" />


Z 64533ba58faa0d37d247dd07ac1098de