Trying to Use Parens & Append
Posted: 2014-02-18T18:14:10-07:00
1st time poster
Im6, Linux Mint
I just started using IM and looked thru the examples as well as some of the questions on the forum, but I still can't seem to combine all these steps into 1. I basically want to take a jersey, a number, a name, and motto and a number, put the number, name, & motto on the jersey, and then watermark the image. Depending on the name, number & motto, resizing has to be done before placing it on the jersey.
Steps I'm using now which work fine, but there has to be a better way:
#create a file with the person's name
convert -size 1200x1200 xc:transparent -font athletic -pointsize 456 -fill white -annotate +200+350 "Name" name.png
#puts the name and a premade number file together
composite -dissolve 100% -quality 100 name.png 07.png nameNumber.png
# resizes the name/number file to fit on the currently selected jersey
convert -resize 35% nameNumber.png nameNumber-resized.png
# create the image with the motto text
convert -size 1200x1200 xc:transparent -font athletic -pointsize 228 -gravity center -fill white -annotate +0+96 "Motto" motto.png
# resize it to fit the curent jersey like the name/number image
convert -resize 35% motto.png motto-resized.png
# combine the two previously resized images
composite -dissolve 100% -quality 100 nameNumber-resized.png motto-resized.png nameNumberMotto-resized.png
#put the combnies name/number/motto on the blank jersey
composite -dissolve 100% -quality 100 -gravity center -geometry +0-100 nameNumberMotto-resized.png blankJersey.png jerseyPreWatermark.png
# watermark the image
composite -dissolve 2% -tile watermark.png jerseyPreWatermark.png jerseyNameNumberMotto.png
Just typing all this out, I KNOW there as to be a way to combine these. Nothing I've tried so far works. I think the arrays, -append, +append, etc is just too much for my slow mind!
Thanks in advance for any help you can provide.
Im6, Linux Mint
I just started using IM and looked thru the examples as well as some of the questions on the forum, but I still can't seem to combine all these steps into 1. I basically want to take a jersey, a number, a name, and motto and a number, put the number, name, & motto on the jersey, and then watermark the image. Depending on the name, number & motto, resizing has to be done before placing it on the jersey.
Steps I'm using now which work fine, but there has to be a better way:
#create a file with the person's name
convert -size 1200x1200 xc:transparent -font athletic -pointsize 456 -fill white -annotate +200+350 "Name" name.png
#puts the name and a premade number file together
composite -dissolve 100% -quality 100 name.png 07.png nameNumber.png
# resizes the name/number file to fit on the currently selected jersey
convert -resize 35% nameNumber.png nameNumber-resized.png
# create the image with the motto text
convert -size 1200x1200 xc:transparent -font athletic -pointsize 228 -gravity center -fill white -annotate +0+96 "Motto" motto.png
# resize it to fit the curent jersey like the name/number image
convert -resize 35% motto.png motto-resized.png
# combine the two previously resized images
composite -dissolve 100% -quality 100 nameNumber-resized.png motto-resized.png nameNumberMotto-resized.png
#put the combnies name/number/motto on the blank jersey
composite -dissolve 100% -quality 100 -gravity center -geometry +0-100 nameNumberMotto-resized.png blankJersey.png jerseyPreWatermark.png
# watermark the image
composite -dissolve 2% -tile watermark.png jerseyPreWatermark.png jerseyNameNumberMotto.png
Just typing all this out, I KNOW there as to be a way to combine these. Nothing I've tried so far works. I think the arrays, -append, +append, etc is just too much for my slow mind!
Thanks in advance for any help you can provide.