I'm trying to create a map for Risk. I found an image scouring the Internet that fits what I want perfectly, except instead of having borders, each province is just a different color. I would like to add borders to each province. (The first image in this album is what I am describing here).

So, using GIMP, I tried going to Select > Border and creating a 1px one for the first territory. It worked fine (see the second).

But then adding a border to an adjacent one creates what looks like a 2px border between territory 1 and territory 2 (see the third).

Is there any way for GIMP to create a border around a selection such that if there already exists pixels of that color, it'll just ignore it?

(I realize that a possible solution is to blow up the image 2x with no interpolation, create borders around everything which will be each 2px, and then downscale it to the original size. The size I want for the image (14000px by 5500ish px) is a bit big for that, though, so I'd like to avoid it if possible.)

Thanks very much!


1 Answer 1


Just use one of the filters in filters/edge-detect - with some extra actions until you get what you want.

What I did here: duplicated the layer, cut out the oceans (I don't know if it is your intention) by clicking on one by one with the magic-wand, right click on the layer in the layers dialog, add alpha channel, then edit->cut.

After that, , select->None , filters->edge detect->edge... , and picked a suitable algorithm from the list - the oceans border will be thinner, if you don't want that, just fill then with white instead of cutting them out to transparency.

Now you have your countries in black, and colorfull edges: Use the select by color tool, click on a black part of the map, and edit->cut; to turn the edges black use either colors->threshold, or colors->curves` flatlining the curve to zero.

Add a backgorund layer on the color of your choice and export the image. enter image description here

  • Perfect solution, thanks very much! but if anyone stumbles upon this, stick a light grey layer in between the original and the duplicated layer you're modifying. It makes seeing the colorful borders a lot easier so it's not as painful to set the threshold properly. And even for not removing oceans you have to add the alpha channel. (I apologize for not providing the full image and making you cut out the picture!!)
    – r9022
    Jul 22, 2014 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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