Gimp-Forum.net
Centre image at selected point - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Centre image at selected point (/Thread-Centre-image-at-selected-point)



Centre image at selected point - surdo - 12-08-2022

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


RE: Centre image at selected point - rich2005 - 12-08-2022

Sounds like a job for Ofnuts. He already has a plugin ofn-layer-aligner.py from down this list: http://sourceforge.net/projects/gimp-tools/files/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


RE: Centre image at selected point - Ofnuts - 12-09-2022

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


RE: Centre image at selected point - denzjos - 12-09-2022

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.


RE: Centre image at selected point - surdo - 12-09-2022

Thanks for your help everyone