Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
composed_image.combine_options do |c|
c.fill(price_color)
c.pointsize '24'
c.draw "text 30,40 'Hi this is my text'"
end
Somehow it would be great to know how much width and height that text is going to take. I would like that to avoid the text to be cut by the end of the image that is being drawn to. Is there anyway I can know which width/height a particular text with particular pointsize will take?
mogrify is very simplistic and does not have all the features of convert. It will only process images to images and not images to information. For that you need to use convert and label: or caption: to create the image and get its size information or better use -debug annotate. See http://www.imagemagick.org/Usage/text/#font_info
convert -background white -fill black -font arial -pointsize 24 label:"this is a test" -format "%wx%h\n" info:
129x28