Save & earn with MPB; trade-in and buy pre-loved

How To Create A Black Border In GIMP

This tutorial will show you how to use GIMP to create a black border for your images.

| Gimp
Updated March 2012.

It's impossible to look through the photo gallery here on ePHOTOzine without coming across a photograph that has a nice thick black border around it.

Obviously a lot of you know how to do this, but for those who are new to editing and want to learn how, here's the basic procedure for you to use and adapt to suit your purposes. This method allows you to create a thick black border with a simple white pinstripe around the edge of the image to keep things interesting, and it can be adapted to images of any shape as long as you can create a selection that's the same shape.

Start Image:
How To Create A Black Border In GIMP: Pier low angle

Step 1 - Create New Layers

Since we are not going to edit the image itself in any way we can skip the usual formality of duplicating the background layer for easy troubleshooting.

However, what we have to do is create two other layers that are empty, so press the New Layer button to create each layer and rename them to ‘Black' and ‘White' in the New Layer windows that open.

How To Create A Black Border In GIMP: Create New Layers

Step 2 - Move 'Black' Layer

Now left-click and drag the black layer so that it's now the bottom of the list. Alternatively you can just press the green, downwards pointing arrow in the layers pane to nudge it down until it's in position. Just make sure you have the right layer selected before you do this.

How To Create A Black Border In GIMP: Move Black Layer

Step 3 - Canvas Size

Open Image, Canvas Size and a new window will open up. First things first click the chain that links the top two properties together to undo it, this will stop your border sticking to the image's aspect ratio and having squished sides as a result. Then change the right-hand drop-down menu to inches or millimeters so you can get an idea of exactly how big you are making your border in real terms. Add the amount you'd like to the edges of your canvas in both boxes, as they now need altering independently due to them being unlinked. Remember, you've extended the canvas size so the figure you input needs to be bigger than the one that's already there. If you put a smaller number, your image will be shrunk.

Step 4 - Canvas Size Part Two

Now we move down to the Offset options in the canvas size window. This determines the position of your existing image in the enlarged canvas, and the thumbnail is interactive if you want to drag it about manually. However, for the most part you'll want to have it in the middle, and you'll have probably already pressed the Centre button by the time you read this, and if you haven't done so then do it now.

After this you will see your image nicely positioned in the middle of the preview and you are free to press Resize to apply the change.
How To Create A Black Border In GIMP: Canvas size

This can take a little trial and error but you can simply undo your action and start again if you create a frame that's too big or not quite large enough.

Step 5 - Bucket Fill Tool

Equip the Bucket Fill tool by pressing Shift and B together. Left-click the Black layer in your layers panel just to make sure you have that as the active layer then open Layer, Layer to Image Size to make the layer cover the entire image space once again.

How To Create A Black Border In GIMP: Add colour to a layer

Now press D to make sure that black is your foreground colour and left click anywhere you want in the active canvas. Et voila you have your black background.

Image With Black Frame:

How To Create A Black Border In GIMP: Black frame

Step 6

Now to add the white pinstripe. Before we do this we need to once again left-click the White layer to make it our active layer.  Then open Layer, Layer to Image Size. Now that it's big enough to allow us to draw outside of our original image we can start thinking about our decoration.

Step 7

The easiest way to add this, since GIMP doesn't have any simple shape tools, is to create a selection and stroke it. A good amount of judgement is required here when you are drawing the selection, so first equip the selection tool best fitted for the shape of your image; if it's rectangular use the rectangle selection tool, circular or oval use the ellipse and so on.

How To Create A Black Border In GIMP: Selection Tool

The easiest way to get this right is to hide the black layer by clicking the visibility icon next to it in the layers pane and then opening up View, Show Grid (don't worry, those crosses haven't been added to your image).

How To Create A Black Border In GIMP: Apply Grid

Step 8

Now equip your selection tool and select a point on the grid to the top left that is about as far from the image as you'd like your border, or a point between the crosses that appeals similarly. Left-click here and drag your selection diagonally to the opposite corner and then the corresponding point reflected over on this side. Release your mouse button and you should have the selection the same distance from the image on all sides.

How To Create A Black Border In GIMP: Selection in place

Step 9

How To Create A Black Border In GIMP: Foreground colourYou can click the visibility icon to the side of your black layer now to make it reappear, and you can also open View, Show Grid again to hide those crosses (since you won't be able to see them on the black anyway). Change your foreground colour to white, which should be as simple as pressing X since you should have the default palette out at the minute, otherwise do it manually, and open Edit, Stroke Selection. This will open a new window that will allow you to change the parameters of your white border.

How To Create A Black Border In GIMP: Stroke

Step 10

We want to choose Stroke Line here since that's what we're after, but you can feel free to experiment with the various patterns and dashes etc. that you can use instead once you've learned the basic procedure.

You can select how thick you want the line, for our image 3px will be enough. You can also expand some extra options by pressing the little + icon to choose how you want your corners to look or if you want the line to be dashed.

You can also choose to have the line stroked with the Paintbrush or other drawing tool, in which case change the settings and brush tip for that now before pressing Stroke, however if you're after a bog standard line just check the settings are all at their defaults and press Stroke. Press Control, Shift and A to deselect everything so you can see your results. After this you should have a nice, neat border.

Image With Black And White Frame:

How To Create A Black Border In GIMP: Image with a black & white frame

As you can see there are a lot of customisation options available to you in terms of the Stroke method and appearance and you can go as far as you like adding different line styles and painted borders too.

Find out more about Vanguard's products by clicking these links:

How To Create A Black Border In GIMP:

How To Create A Black Border In GIMP:

MPB Start Shopping

Support this site by making a Donation, purchasing Plus Membership, or shopping with one of our affiliates: Amazon UK, Amazon US, Amazon CA, ebay UK, MPB. It doesn't cost you anything extra when you use these links, but it does support the site, helping keep ePHOTOzine free to use, thank you.



PaulSaute Avatar
14 Mar 2012 6:48PM

I use GIMP as my usual photo editing software. If you have FX-Foundry plug-ins, you can use the FX-Foundry -> Image Effects - Double Border for very good results as well.

I've added an example in my protfolio.

Pau S
MartPics Avatar
MartPics 17 7 United Kingdom
15 Jun 2012 10:42AM
Great article, but I don't understand why for a simple black line borders (or any colour for that matter) your using layers, to do this on Gimp? It's just as easy to use 'Add Border' which is found in 'filters' menu. Save image.

I use this method all the time.


You must be a member to leave a comment.

ePHOTOzine, the web's friendliest photography community.

Join for free

Upload photos, chat with photographers, win prizes and much more.