"reverse-cropping" how to?

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?".
Post Reply
User avatar
magick
Site Admin
Posts: 11100
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-04-05T09:25:13-07:00

To rotate text on a canvas of solid background, try this command:
  • convert -size 176x204 xc:black -font impact.ttf -pointsize 88 -fill white -annotate 30x30+0+60 "PIMPIN" output.jpg

User avatar
magick
Site Admin
Posts: 11100
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-04-05T09:53:50-07:00

The best solution is to use an API such as PerlMagick but from the command line you could create the label from the command line and use the identify program to extract the image size and in a shell script use the size to calculate the offset needed for annotating the text onto you canvas.

The xc: format is is a canvas whose color is whatever follows the prefix and whose size is specified with the -size option:
  • convert -size 100x200 xc:red red.jpg

Post Reply