Open the image you want to add the border to.
Make a new layer.
Use the selection tool to create a rectangle around it.
Left click, then select "stroke".
Make a stroke of white, 1px in size.
On that layer, right click, then select Blending options.
Once a window opens, select pattern overlay.
Where a little pattern is (should be a blue thing with bubbles), click it.
Click the settings icon, then select "load patterns".
Find and select the pattern you previously downloaded.
In the box where a pattern is, click that to select the dotted pattern.
Adjust the scale to change the size and spacing of the dots.
Select "stroke" and add a 1px stroke.
To change the color of the dotted border, select color overlay (same blending options window).
Make the blending mode "screen" then choose the color you want.
i use scanline 2 pattern.