Adding a frame to an image

I want make an app that add a default frame to an image uploaded on my app.
I have no clue where to start.