On Photoshop,
- Hit the rectangular marquee tool
- Drag it across the canvas so it outlines the edges
- Right-click > Stroke > 2-3 px in width, and set the color to white
- Go to the layers panel & set the blending mode to overlay (it's beside opacity, all layers are set to the normal blending mode by default)
The darker the image, the more the white overlay will show up.