GIMP Script-fu

Artifact [abe6a7fd06]
Login

Artifact abe6a7fd0642bb5fbfa9649cc5786cc9ff00052c:

Wiki page [sg-layer-fit-to-selection] by saul 2012-01-19 10:13:12.
D 2012-01-19T10:13:12.533
L sg-layer-fit-to-selection
P 90ce04560cfc6442c7e809938d8262ace4b936f3
U saul
W 1006
<dl>
<dt><b>Command:</b> <dd>Fit to Selection</dd></dt>
<dt><b>Menu:</b> <dd>"<Image>/Layer/Fit to Selection"</dd></dt>
<dt><b>PDB Name:</b> <dd>script-fu-sg-layer-fit-to-selection</dd></dt>
<dt><b>Download:</b> <dd>[http://chiselapp.com/user/saulgoode/repository/script-fu/artifact/1798e8830fef11e639d5fe89eda4c0927d542d8c|sg-layer-fit-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 fit within the image canvas. The original aspect ratio of the layer is maintained.


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.
</dd></dt></dl>

Z a52fa6899976f78037d4bd1515dd0222