supermario
supermario

Reputation: 2765

How to add description to photo using imagemagick?

I'd like to add descriptions to this photo:

enter image description here

so that it look like this:

enter image description here

The command that I use is:

montage -pointsize 14 -gravity NorthWest  -title "\nName: $filename\nOrigin:$origin \n Price:$price "  input.png output.png

But instead I get:

How can I fix this? I need the description to appear on top left in a fringe not more than 20% the overall height of the image?

enter image description here

Upvotes: 0

Views: 69

Answers (1)

Mark Setchell
Mark Setchell

Reputation: 208107

You can do something like this:

#!/bin/bash
name="Flower"
origin="Moon"
price="£3.99"
magick flower.jpg -size "%[fx:w/4]x%[fx:h/4]" caption:"Name: $name\nOrigin: $origin\nPrice:$price" -trim +swap -append result.jpg

enter image description here

Upvotes: 1

Related Questions