GIMP Script-fu

Update of "sg-scale-to-selection"
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: 4871b3922ab44e95cf32488ca7fe92b25947d487
Page Name:sg-scale-to-selection
Date: 2014-05-19 15:39:42
Original User: saulgoode
Parent: a4122f2162a9ea9da139b1e8d76aa44830771eaa (diff)
Content
Command:
Scale to Selection
Menu:
"<Image>/Layer/Scale to Selection"
PDB Name:
script-fu-sg-scale-to-selection
Download:
sg-scale-to-selection.scm (after the page appears, click on the "Download" command)
License:
GPLv2+

Description:

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 is also available.