Watermark with Text
Posted: 2011-07-27T11:43:53-07:00
Hi, I'm trying to watermark an image with text, but I'm struggling to get this done. I've read many blogs online, including http://www.imagemagick.org/Usage/annotating/#wmark_text ...but my watermark is just not coming out correctly.
My main problem is that my watermark seems to have a background that is visible (though somewhat lightened) even after the "composite" command...The first command DOES create a watermark. And the second command DOES put the watermark on the image...but I can't get it to look correct...like an embossed/watermarked text on the image...
I'm using ASP.NET, but I'm basically just using a shell command from there.
Here's my code:
convert -size 300x50 xc:grey30 -background transparent -font Arial -pointsize 20 -gravity center -draw "fill white text 1,1 'Tequipment.net' text 0,0 'Tequipment.net' fill black text -1,-1 'Tequipment.net' " +matte WATERMARK_FILE.png
composite -dissolve 50% -gravity south WATERMARK_FILE.png INPUT_IMAGE OUTPUT_IMAGE
I've also tried -watermark 30%, instead of -dissolve 50%, in the composite command...plus MANY OTHER THINGS.
I've tried playing with the first command:
-background none instead of -background transparent
-xc:white and xc:black instead of xc:grey30
Please help! I really need to get this working already.
Thanks in advance!
My main problem is that my watermark seems to have a background that is visible (though somewhat lightened) even after the "composite" command...The first command DOES create a watermark. And the second command DOES put the watermark on the image...but I can't get it to look correct...like an embossed/watermarked text on the image...
I'm using ASP.NET, but I'm basically just using a shell command from there.
Here's my code:
convert -size 300x50 xc:grey30 -background transparent -font Arial -pointsize 20 -gravity center -draw "fill white text 1,1 'Tequipment.net' text 0,0 'Tequipment.net' fill black text -1,-1 'Tequipment.net' " +matte WATERMARK_FILE.png
composite -dissolve 50% -gravity south WATERMARK_FILE.png INPUT_IMAGE OUTPUT_IMAGE
I've also tried -watermark 30%, instead of -dissolve 50%, in the composite command...plus MANY OTHER THINGS.
I've tried playing with the first command:
-background none instead of -background transparent
-xc:white and xc:black instead of xc:grey30
Please help! I really need to get this working already.
Thanks in advance!