Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Centre image at selected point
#1
Hi,

Starting with an image on an oversized canvas (ie. with space all around the image), I was wondering if there's to select a point on the image with the mouse and then snap this point to the centre of the canvas?

Hope this makes sense. I frequently have to centre scanned maps in this way and would like to find a way to do it quickly and precisely.

Thanks
Reply
#2
Sounds like a job for Ofnuts. He already has a plugin ofn-layer-aligner.py from down this list: http://sourceforge.net/projects/gimp-too...s/scripts/ dated 2016-07-12

Quick to set up, it is not.
Make a path from selected layer point to center of canvas (there are scripts to set center-line guides)
Duplicate path
Move duplicate path so start (duplicate) = finish (original)
Merge the paths
Apply the plugin

Reads more complicated than it is: 40 second example https://i.imgur.com/i6IIEO0.mp4
Reply
#3
With current 2.10 Crop tool (that doesn't delete anything, and will even "grow" the image), just use the crop tool with Expand from center and Allow growing options, and start on the point you want to be the center?

Otherwise, not hard to write a script given a proper definition of "centering image" (what happens at the borders?), but a script cannot read the point where you click, so you have to designate the point by other means (intersection of guides, for instance) that aren't so practical
Reply
#4
What I did to solve this : set guides to the center of the canvas (Image / Guides / Presets / On Image / Centered). I think this is a plugin from Ofnuts. Set the layer with the image to move active. With the 'Fuzzy Select Tool' select the whole image you want to move on this layer. Click on the point in the image you want as reference point and drag it to the center of the big canvas (the point where the guides intersect). Done.
Reply
#5
Thanks for your help everyone
Reply


Forum Jump: