EDIT: cday was a bit quicker than me.
Simple border - Canvas resize - Manual
For adding a simple, rectangular border you resize the canvas of your image. When resizing, you use the colour of your choice as border.
1. Open image
2. Image > Canvas size
3. In "Screen size" panel choose "Pixels" as unit.
4. Uncheck "Keep ratio" (because you want the same thickness for your border in all directions)
5. In "Screen size" panel increase Width and Height. If you want your border 20 pixels thick, you add 20 pixels to Width and Height.
6. For "Image position" please choose "Center"
7. Choose a background colour. The border will have the chosen background color.
8. Press "OK" to perform the canvas resize.
By repeating the above steps with different colours you can make the border look quite interesting.
Simple border - Canvas resize - Batch
Even simpler than the above manual steps is creating a border using XnView's batch conversion. Again, the "Canvas resize" is the transformation to add the border. The good thing in the batch creation is that you can specify delta values, i.e. you don't have to calculate the new width but let XnView calculate it.
1. In XnView browser, select one or several images that you want to add a border
2. In "Output" panel specify "$transformed" as output directory. This will force XnView to save the results of the batch processing in a subfolder "transformed" of the current folder.
3. Select "Tools > Batch Processing..."
4. In "Transformations" tab add "Image > Canvas resize"
5. In "Parameters" panel specify the width and height of your border either in pixel or percent. Please check "Use above values as size deltas" and make sure that position is "Center". Last not least choose the background colour.
6. Repeat steps 3 and 4 if you want to create a multi-coloured border.
7. Save your script for later reusage by using "Save...".
8. Press "Go" to start the batch processing.
Original:

- 1156069538516-320x240.png (40.34 KiB) Viewed 3758 times
Result:

- 1156069538516-320x240-border.jpg (15.88 KiB) Viewed 3758 times
That's the contents of the .xbs file which created the above border:
Code: Select all
canvas( 0 #10 #10 4 255 128 0 0 )
canvas( 0 #10 #10 4 128 64 0 0 )
canvas( 0 #10 #10 4 64 0 0 0 )
settings( 1 0 0 0 0 0 0 )
output_path( $\transformed )
output( jpeg 80 0 0 0 0 0 1 0 0 0 1 )
More sophisticated borders
For adding a more complicate and perhaps more appealing border, you can use PhotoMasque and/or one of the Adobe 8BF plugins. See related topic:
-
New Addon "PhotoMasque" for 1.92
-
Nouvelle bordure
-
Integrating Adobe filters