ImageMagick photo montage: polaroid

How to use new montage command parameters with ImageMagick to create polaroid shots. See my previous post for basic montage use. The -polaroid [angle] command simulate a polaroid picture. Use +polaroid to rotate the image at a random angle between -15 and +15 degrees. You’ll need to proceed several times to get a nice gallery, all the random rotations not being well balanced. Let’s begin.

polaroids

Parameters:

  • geometry 120×120-10+2: tiles size and margins [width x height + horizontal margin + vertical margin]. Horizontal margin can be negative to make polaroid overlap
  • -thumbnail 128×128: similar to -resize, except it is optimized for speed and any image profile
  • tile 8×2: : tiles display [nb of colums x nb of rows]. If the number of images is superior to the maximum number of tiles available, several montages will be created. To create a one-line only montage: -tile x1
  • background grey60: tiles background color. In a polaroid context, this parameter, when located before ‘+polaroid’, defines the shots shadow color
  • polaroid 0: to use the default options (random angles), use +polaroid. to use custom options, -polaroid [angle], 0 removes angle
  • -gravity center: suggests the midpoint of the image
  • background transparent: the background option located after Polaroid defines the final image background. Here, transparent
  • -set caption: add a caption to the polaroid
  • -fill white: font color setting
  • -pointsize 14: caption font size

Examples:

Classic photo montage without rotation, using 2 rows of 3 images each:

$ montage '*.*' -thumbnail 250x250 -sharpen 10 -bordercolor snow -background grey20 -polaroid 0 -background transparent -geometry '1x1+0+0<' -tile 3x2 montage_1.png

montage_1 Overlaping montage. Note that you need to add the ‘null:‘ argument to add an invisible first image and increase the number of images in the ‘tile‘ argument, otherwise the montage will be cropped.

$ montage -gravity center null: '*.*' -thumbnail 250x250 -sharpen 10 -bordercolor snow -background grey20 +polaroid -background transparent -geometry '1x1-40+0<' -tile 8x montage_2.png

montage_2Dark polaroids stack with captions.

$ montage -gravity center null: '*.*' -thumbnail 250x250 -sharpen 10 -bordercolor black -set caption '%t ' -fill white -pointsize 14 -background grey20 +polaroid -background Transparent -geometry '1x1-60+0<' -tile 8x montage_3.png

montage_3

Sources:

Advertisements

Comments are closed.

Blog at WordPress.com.

Up ↑