I want to create an application where I’ll create an image from the application user’s friends profile image.

In this image there are 4 photos of friends, I want to create a new [single] image in that image all of the images will be pasted.
What is the best way to go about doing this?
if i get your question right you will first need all their pictures, try the following: