Post Reply 

Merging two images and cropping anything outside of a certain area

Jun 21, 2011, 01:00
Post: #1
Merging two images and cropping anything outside of a certain area
Hey, whats up? New here.

So I'm trying to make a modified loading screen for a game (Homeworld 2 to be exact) but I'm not sure how to do this. You see the loading screen has a black background with a blue line in the shape of a hud, with the actual picture inside of it (Example, the loading bar is rendered dynamically and not part of the image). What I was thinking of doing, is erasing the inside, then copy & pasting the picture I want as a new layer over it, then cropping out the area outside the blue "hud" to give a black background with a internal picture. I was wondering if there would be a way to do that without overwriting the blue outline and having to do it manually.
Find all posts by this user
Quote this message in a reply
Jun 21, 2011, 06:09
Post: #2
RE: Merging two images and cropping anything outside of a certain area
im not sure if this is what you meant you wanted...and i rushed through this since it was just your example... but all i did was a simple copy and paste then i ended up flipping each selection and then i smudged out the creases, it took me like 4 mins. i couldnt find my cloud brushes either or the example would of looked a little more pulled together, but theres one way to what ya want...if it is what ya want...good luck...

[Image: gimpnow.png]

[Image: MMSSig-2.png]
Find all posts by this user
Quote this message in a reply
Jun 21, 2011, 06:11
Post: #3
RE: Merging two images and cropping anything outside of a certain area
eek. remember i rushed through it...

[Image: MMSSig-2.png]
Find all posts by this user
Quote this message in a reply
Jun 21, 2011, 07:13 (This post was last modified: Jun 21, 2011 07:15 by MechWarrior001.)
Post: #4
RE: Merging two images and cropping anything outside of a certain area
While that's a pretty good job, in actuality I want anything inside that "binocular box" created by the blue outline I want erased and replaced, without any damage being done to the blue outline and the black area outside. How would I do that without damaging the blue outline or bleeding out into the black area outside?
Find all posts by this user
Quote this message in a reply
Jun 21, 2011, 07:24
Post: #5
RE: Merging two images and cropping anything outside of a certain area
What you need is a good selection. Given the tones of your image it shouldn't be too hard to extract from the "blue" channel. But the particulars may take some time to work out...

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Jun 21, 2011, 07:30
Post: #6
RE: Merging two images and cropping anything outside of a certain area
(Jun 21, 2011 07:24)ofnuts Wrote:  What you need is a good selection. Given the tones of your image it shouldn't be too hard to extract from the "blue" channel. But the particulars may take some time to work out...

One idea I was thinking of would be to manually select the area inside at 1600% zoom or something, then set it so the copy/paste layer only appears inside that area. How hard is it to actually select a area pixel-by-pixel? I was thinking do it manually around the corners and just do a straight-line guide on the edges.
Find all posts by this user
Quote this message in a reply
Jun 21, 2011, 09:45
Post: #7
RE: Merging two images and cropping anything outside of a certain area
Much better way: use Paths. It's very easy to create a "Path" (once you know how to use the path editor, of course) that follows the outer line. Most of the outer ine is straight segments, and the round corners are easily emulated (drag the handles symmetrically for slightly more than half the circle radius (.5522, if you want to be accurate).

Once you have this path (took me 3 minutes, but I'm very used to paths Smile ):
  • you can "stroke" that path to recreate the outer line in any way you fancy (change the color, etc...)
  • since it's a closed path you can obtain a selection from it
  • by shrinking that selection 4px you obtain a selection that rather closely matches the HUD screen
See attachment, with:
  • a quick and dirty path (you can do a bit better with a some more time/care, in particular using guides to insure symmetrical corners)(see Paths dialog)
  • the selection derived from it (see Channels dialog)
  • a layer with a cutout from the selection (see Layers dialog)
  • an outer line redrawn using the path (and a little script to give it a luminescent look). The top left corner demonstrates that I've not been accurate enough when drawing the path, but hey, this is just an example...

[attachment=487]

As a general rule, all the geometric stuff is very efficiently/quickly handled with paths, and this produces much cleaner results because Gimp will recreate the anti-aliasing as needed.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  How do I open multiple images in Gimp? Pnem42 1 78 Nov 9, 2017 05:23
Last Post: paynekj
  removing unwanted portions of selected area in an image pizzipie 1 91 Nov 2, 2017 05:31
Last Post: paynekj
  Removing color from multiple images Aquilo 6 3,036 Sep 28, 2017 12:56
Last Post: angel0sdh
Wink Use area selection as a template to another area eduardolucioac 2 221 Jul 31, 2017 17:31
Last Post: eduardolucioac
  Cropping but selecting stuff to discard, not keep. seanspotatobuisness 1 226 Jul 14, 2017 18:46
Last Post: ythgilb

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS