How to Create a Polaroid Frame with ImageMagick?

This article provides a quick overview and step-by-step guide on how to use the ImageMagick convert command to transform a standard image into a classic, retro Polaroid-style photo. You will learn the exact command-line syntax required to add the characteristic wide white borders, a subtle drop shadow, and custom text to the bottom margin of your image.

The Basic Polaroid Command

ImageMagick includes a built-in -polaroid operator that automates most of the styling, including the border, a slight artistic rotation, and a drop shadow.

Here is the fundamental command to achieve this effect:

magick convert input.jpg -bordercolor white -background black +polaroid output.jpg

Note for ImageMagick v7+: Modern versions of ImageMagick use the magick command instead of just convert. If you are using an older version (v6 or earlier), you can omit magick and start the command directly with convert.

Adding Custom Text to the Margin

One of the most iconic features of a Polaroid photo is the handwritten note at the bottom. You can use the -set caption option to add your own text to the frame before applying the effect.

magick convert input.jpg -background black -set caption "Memories of 2026" -bordercolor white +polaroid output.jpg

Breaking Down the Command Options

To customize the output further, it helps to understand what each part of the command is doing: