I have a sample image frame(see below) saved in the server and a function that will take an array of image URLs, crop the images into a circular shape to match the height /width of a cat image in the frame (60px x 60px) and replace cats from the left depending on the number of images and finally save the image back I need to know how to do this using graphicMagick in node.js.
Just to be more clear
- I have an image frame.png
- I have an array of two URLs ['www.someurl.com/image1.jpg', 'www.someurl.com/image2.jpg]
- for each URL in the array
- Download image i from URL into a temp location
- Crop the image i into a circular shape of radius 60.
- Put it on top of frame.png at some position (xi,yi)
- Save the new composite image
- upload it back

Here I am posting my solution what I did to circularize image and then compose them on a frame image (png). The only downside to this solution is that there are multiple writes to the file and I couldn't do it in a single write.
I hope this helps someone in the future,