I wanted to create a polaroid effect using ImageMagick and discovered there is a -polaroid transformation operator to do this. Though the result looks nice, it was not polaroidish enough for me. A real polaroid picture has to have a larger border at the bottom to my opinion. I found the original work which led to the polaroid transformation operator. I used this and tweaked it a little to get a larger border at the bottom.
The parameters used to create the images shown above is given below.
# Custom polaroid effect convert -size 334x406 canvas:"#f0f0ff" -background none \ lena.png -geometry 300x300+17+17 \ -composite -interpolate nearest \ -rotate 90 -wave 5x812 -rotate -90 \ \( +clone -flop -background grey75 -shadow 70x5+15+15 \) \ +swap -background none \ -layers merge -resize 144 -rotate 5 polaroid1.png # Out-of-the-box polaroid effect convert lena.png -thumbnail 130x130 \ -bordercolor white -background grey75 -polaroid 5 polaroid2.png