Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to merge parts of an image aligned to their edges?
#1
Consider the following image as an example:


https://i.imgur.com/E91iXwL.png

[Image: E91iXwL.png]

What is the best way to merge the upper and the lower part together?

Edit: It might be better visible what I need if you have a look at the imgur image instead of the embedded image here, as there you can clearly see the borders of the parts I want to merge.
Reply
#2
For your example:

Use Image -> Zealous Crop which removes unused space from edges and middle of the image.

otherwise it is: select -> cut -> paste -> move -> anchor -> autocrop
Reply
#3
Smile 
(03-03-2018, 09:18 AM)rich2005 Wrote: For your example:

Use Image -> Zealous Crop which removes unused space from edges and middle of the image.

otherwise it is: select -> cut -> paste -> move -> anchor -> autocrop

The first advise worked just fine for me. I have one more question for the second option you gave. Is there a way to tell gimp to snap the upper and the lower part together when moving it. For example if I enable "snap to canvas edges" and I use the selection tool, it helps me to select exactly the edges of my canvas. In this example it's not required that the upper and the lower part match exactly if you merge them, but I can think of examples where you'd want not want to move the parts by hand and then auto crop, but rather merge the lower and upper part exactly and then remove the transparent part.

And thank you already for your help  Big Grin
Reply
#4
Quote:.. I can think of examples where you'd want not want to move the parts by hand and then auto crop, but rather merge the lower and upper part exactly and then remove the transparent part.

All sorts of ways, I would be inclined to use guides and snap-to-guides.
Select All (ctrl-a), then Guides-from selection and a guide at the join.
Maybe add a couple keyboard shortcuts, (guides-from-selection / remove-all-guides / anything-else-you-use-frequently)

example https://i.imgur.com/l4KEGwy.jpg
Reply
#5
I would duplicate the layer, crop each layer to a horizontal strip with a group of lines, and then move them around and merge the result. If you need to do this to many files (or have more than two instances of the problem, two scripts that can help:
  • ofn-guillotine-layer to split a layer using guides
  • ofn-swap-strips to exchange the positions of two adjacent strips designated by guides
Both available here: https://sourceforge.net/projects/gimp-to...s/scripts/
Reply
#6
Smile 
Many thanks folks. The way that worked out best for me with this tipps is:

Create new layer containing upper part. -> Select lower part and add guides to selection. -> Move upper part/the new layer to the lower one and make them snap together using the created guides.

Make sure to enable:
-Snap to Canvas Edges
-Snap to Guides

Make sure to disable:
-Snap to Grid (Now idea why we need this one)

Hope this helps future readers Smile
Reply


Forum Jump: