Version 2 has minor changes.
I think it is cleaner than version one like it resizes the frame layer to image size so that the layer isn't 1 pixel higher and 1 pixel lower than image size (I needed to make it 1 pixel wider in top/bottom direction because of transform perspective artifacts that didn't fully make corners meet).
And it also puts your original image on top so that it's not covered by frame's 1 pixel wide border (in the inner part, also to avoid 1 pixel error artifacts by transform tool).
Tin, I really love this script, gives lovely border. I did have a problem with one that I have repeated several times to check. I said no to Mirror but the image of the cat and bird are in the border anyway.