Trimming whitespace

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
troyd1
Posts: 73
Joined: 2007-07-29T17:13:19-07:00

Trimming whitespace

Post by troyd1 »

I have 6.6.9-7. q16 dynamic - window 2003 server

I am using the caption command on a charactor and then centering it on another image. It moves vertically depending on the font and the character. I am guessing that it is because the font is adding whitespace either above or below the actual character as for line height. How can I trim away any whitespace from the top or bottom of the image created with the caption command?
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Trimming whitespace

Post by glennrp »

-trim

Note, that will also trim whitespace from the left and right.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Trimming whitespace

Post by fmw42 »

perhaps should be -trim +repage to remove the virtual canvas
Post Reply