You are here

Extend Layer To Image Size

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
sg-extend-layer.scm4.44 KB

The script adds an "Extend to Image Size" command under the Layer Menu which will scale the (visible portion) of the active layer so that it has the same dimensions as the image canvas.

If there is a selection when the script is run, the selected region will be "protected" from scaling and only the (visible) regions of the layer residing outside the selection get scaled.

If the entire layer is selected then the entire layer is "protected" from being scaled; and the outermost border is extended out to the image boundaries.

Code License: 
GIMP Version: 
Scripting Engine: 


Everything works fine if the layer has to be extended only in width or height

but i get weird result with multilayer image if the layer has to be expanded in both direction
then for some reason are taken as input also other layers not only the active, result may look then as a cross with the original layer at center, 4 grey squares at side, and and pixel stretched from the active and other layer at sides

Saulgoode, I found a real use for it. When you use HUGIN to stitch photos, quite often the finished edges are all over the place. Using the filter with a subsequent blur, smudge or clone, extends the edges to enable a more generous or nicer crop.

Subscribe to Comments for "Extend Layer To Image Size"