I would like to be able to take 5 JPG images and process them with ImageMagick to create an effect showing the photos as a stack of Polaroid-like prints.
Assuming all photos are the same aspect ratio, they need to be resized to the same size, a 10px Polaroid-like border applied, then all slightly rotated and offset such that images below the top one are partially visible around the edges.
The rotation/offset doesn't need to be random as such - it could be hand-coded for each image in the stack if it is easier than doing it truly random?
Here is an example of the effect I am aiming for:
Can someone help with the correct parameters to use - I'm assuming we would want to use convert?
Edit: I already knew about the example contained on the ImageMagick page, but it doesn't specifically address my requirements - they clone the original image, they don't use multiple separate images. They also don't do a great job of explaining in each example exactly what every option does - they assume you already have spent hours (or days!) experimenting with the millions of options available. A bit difficult for someone who has never used the tool to master without a lot of work.
convert thumbnail.gif \
-bordercolor white -border 6 \
-bordercolor grey60 -border 1 \
-bordercolor none -background none \
\( -clone 0 -rotate `convert null: -format '%[fx:rand()*30-15]' info:` \) \
\( -clone 0 -rotate `convert null: -format '%[fx:rand()*30-15]' info:` \) \
\( -clone 0 -rotate `convert null: -format '%[fx:rand()*30-15]' info:` \) \
\( -clone 0 -rotate `convert null: -format '%[fx:rand()*30-15]' info:` \) \
-delete 0 -border 100x80 -gravity center \
-crop 200x160+0+0 +repage -flatten -trim +repage \
-background black \( +clone -shadow 60x4+4+4 \) +swap \
-background none -flatten \
poloroid_stack.png
... it would be great if someone could expand on this example and show me how to modify it to achieve my desired results as above.
I use Simpon Hampel Code with some change in this :
How Margin Image with shadow in imagemagick?
please check it..
Here is the command I found to give a pretty good result for what I needed - thanks to @Jim Lindstrom for putting me on the right track.
Here is the output I get from my images using the above command:
It's not perfect yet, I have some more tweaks I'd like to do which I'll ask about in a separate question.
The docs for "convert" show almost exactly how. Search for "nice looking pile of photos" on http://www.imagemagick.org/Usage/thumbnails/#polaroid
Here's another way of doing it that makes, hopefully, clearer how one would sub in their own photos: