If it’s not for print, you might be able to use this Image Framer jquery plugin that I’ve made. It basically stretches frames around practically any size image. The website (that had been down forever) is back online. The demo page does do a pretty good job at showing you everything, but there are some examples in the repo directory too. The examples don’t showcase all the options, like different sizes.
It comes with frame presets, but I also made this psd template + script combo to go with it, in case people want to make their own frames… That said, the template only produces miter joints.
It is also possible to do something similar purely in Photoshop if you want to generate images with frames attached to the image itself.
I made this PS action for someone as an example. The Action/workflow could be modified to fit other cases quite easily. This also It also makes miter joints and requires the source frame edge to be at least as long as the longest side of the photo.
The action works like this (more or less): You prepare nice long frame image, perhaps by using clone stamp tool if needed and then automate the process where you place, rotate, cut(the 45° angle) and duplicate the frame + repeat the process on all sides. Pretty basic as far as Actions go…
All the major steps:
The white shape in the gif with the 45° angle is a triangle shape layer that is used as the cutter. It’s a psd file that is placed in the photo document on demand.
There are 3 steps in the Action with paths that need to be changed:
Open = Frame file path,
Place = Frame cutter path and
Export = Output path for images.
Then you run it in batch with
File > Automate > Path.
In the Batch window:
Folder(This should be your input folder path)
None(Export step handles saving the files to a specific folder)