How do I move a layer to a specific XY position within the canvas in Gimp?

Currently, the only way I can find is to just eyeball it with the guides and/or mouse position. I want to specify the exact X and Y coordinates.

link|improve this question
I want to know this too, or how to do it in Photoshop. I made a question for that. superuser.com/questions/345669/… – Jonny Oct 12 '11 at 10:21
feedback

1 Answer

I'm using GIMP 2.6.11.

With these lines of Python the active layer can be moved to an absolute position, like (32, 64), from the Python console:

>>> x_new = 32
>>> y_new = 64
>>> img = _[0]
>>> layer = img.active_layer
>>> x_off, y_off = layer.offsets
>>> pdb.gimp_layer_translate(layer, x_new - x_off, y_new - y_off)

Alternatively, if you only want to move the content of the layer:

right-click, Layer > Transform > Offset

or Shft+Ctrl+O

link|improve this answer
1  
This causes the pixels within the layer to move, rather than the layer itself - I need to move the actual layer. What you suggested may work if the layer is the same size as the canvas, or at least big enough not to clip any non-transparent pixels within the layer. – Scott Jul 7 '11 at 19:55
@Scott: I see - sorry I didn't find an easier way, but at least I figured out how to move the layer to an absolute position with some lines of Python. – nikai Jul 7 '11 at 21:32
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.