-extent Width Only

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
jhfry

-extent Width Only

Post by jhfry »

I am generating a series of text images using IM... essentially I create a large layer (1280x1024), put some text at the center of it, add some shadows or other improvements, then I trim it. However, I want to expand the image back out to 1280px wide while maintaining it's trimmed height.

I read that extent can be used as below to set just the height:

Code: Select all

-extent x100
But trying the option below doesn't appear to work at all.

Code: Select all

-extent 1280 
or
-extent 1280x
I would like the above to extend the canvas to 1280px wide, maintaining the height. I would expect that it would use gravity to determine which side of the canvas to add to.

Am I doing something wrong, or does extent only allow vertical 1 dimension adjustments?
jhfry

Re: -extent Width Only

Post by jhfry »

Nevermind... I figured it out. It appears what was happening was that I was forgetting to set the background to none, which made my white text disappear on a white background.
Post Reply