In either Photoshop or Photoshop Elements, I use Image> Canvas size (making sure that the "relative" box is checked)
You can select the size, color and positioning of a border around the image. If you want a variable border, just repeat the steps for each color and size selected.
The size and colors of the borders are determined by the image. I have several actions set up to border the images of my rescue dogs for posting online. I usually save the image 12 inches wide and then place a .1 inch black, .2 inch white and 1 inch black border resulting in this...
The actions I recorded are for placing this type of border in three different sizes; depending on the size of the image I am working with. I often am working with minuscule sized images sent to me by the volunteers of our Maltese Rescue California organization and they need smaller borders to look balanced. This border works quite well when I post my rescue images on petfinder.com or other rescue sites.
Of course, I could vary the size and color of the border anyway I want. I will often use a very thin black .1 inch border with another 2 inch white border surrounding it. I like the black line because it delineates the image.
Both Photoshop Elements and the NIK software package have built-in borders to use such as this done with NIK...
The only problem with the NIK borders is that they are done within the limits of the image. You need to crop a bit loosely or the borders will interfere with your cropping.
You can place any type, size or color border on any image but, some work better than others for each individual image. You can find a lot of information on the strategy of using borders to enhance imagery by doing a Google search. One strategy is to use the two black borders as I have done in the Maltese dog portrait above but, then instead of using white between the two black borders, select a color that appears somewhere within the image. You do this by selecting canvas extension color> other from the canvas size menu and then selecting a color from within the image...
I used to do this but, have standardized in white because IMO the color of the border was distracting at times.
There is a plethora of ready-made border plugins for Photoshop available free of charge on the Web. I assume that there would also be some for other editing programs. Do a Google search using "border plugins" or "Photoshop image frames" as the parameters of your search.