Page 1 of 1
Adding a horizontal stripe to an image?
Posted: 2013-09-22T11:24:21-07:00
by ClumsyNinja
ImageMagick-6.8.3-Q16
How would I either :
Add a horizontal black stripe, centered vertically, to an existing image?
or
Add the stripe to an image at the time of creation (I'm using convert to create)
Either is fine. I figure I can create all the images and then use *.gif to add the stripe afterwards, or if possible, add the stripe to the image when I create it.
Re: Adding a horizontal stripe to an image?
Posted: 2013-09-22T11:41:39-07:00
by ClumsyNinja
So it looks like adding afterwards might be the easiest. Composite looks very simple.
Code: Select all
composite -gravity center pic1.gif pic2.gif mergedpic.gif
Now I'm off to find out how ho make the stripe. Looks like I only need to create that image once.
I'll post my findings here, if nobody replies in the meantime.
Re: Adding a horizontal stripe to an image?
Posted: 2013-09-22T13:27:17-07:00
by ClumsyNinja
What initially appeared to be simple, turned out not to be. I have worked out the solution and will post it here so others may benefit.
I realized that rather than adding a horizontal line over the top of an image, the line needed to be underneath. This is for a simple textual web mouseover button.
So I needed a white background, then a stripe, then on top of the stripe, I needed the text. The solution was staring me in the face.
Start with a blank white image which just contains my yellow stripe, and annotate it.
With Macro Scheduler code
Code: Select all
run program>"%IMexepath%\convert" %IMdocpath%\white-with-stripe.gif -pointsize 12 -gravity west -font Arial-Bold -annotate +4+2 %artistname% -fill black %IMdocpath%\complete-button.gif
Without Macro Scheduler code
Code: Select all
convert c:\white-with-stripe.gif -pointsize 12 -gravity west -font Arial-Bold -annotate +4+2 TEST -fill black c:\complete-button.gif