GIMP Script-fu

Artifact Content
Login

Artifact 4871b3922ab44e95cf32488ca7fe92b25947d487:

Wiki page [sg-scale-to-selection] by saulgoode 2014-05-19 15:39:42.
D 2014-05-19T15:39:42.475
L sg-scale-to-selection
P a4122f2162a9ea9da139b1e8d76aa44830771eaa
U saulgoode
W 1144
<dl>
<dt><b>Command:</b> <dd>Scale to Selection</dd></dt>
<dt><b>Menu:</b> <dd>"<Image>/Layer/Scale to Selection"</dd></dt>
<dt><b>PDB Name:</b> <dd>script-fu-sg-scale-to-selection</dd></dt>
<dt><b>Download:</b> <dd>[https://chiselapp.com/user/saulgoode/repository/script-fu/artifact?name=b3125523d67c5b30662f7e7a645554f8d92005a3|sg-scale-to-selection.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 current layer so that it fits within the boundaries of the selection. If there is no selection when the script is run, the layer is scaled to the image size.


Note: this script uses the selection in a somewhat unconventional manner. Whereas selections are usually employed to delineate affected regions of the image, this script uses it to specify the target size of the layer.

Note: a version of this script which preserves the aspect ratio of the original layer [http://chiselapp.com/user/saulgoode/repository/script-fu/wiki?name=sg-layer-fit-to-selection|is also available].</dd></dt>
</dl>

Z e2fcf3be86820d0d40a2ac7638c7d70b