A Picture Border effect may be downloaded as a Photoshop action. Before execution resize and sharpen the image — no need to flatten layers. The action creates the following layers:
Expand the canvas to accommodate the border, color the border, and expand again for the background. Apply an outer glow effect to the border.