Issue
I'm interested in creating a similar effect for watermarking images on my site.
I need to generate it on the fly as the text in the middle would be different on each photo, so I can't use a precomposed png file.
I'm not bothered about the exact font (I have one I'm happy with), but how can I go about adding a nicely blurred outline around it like they have?
I tried using gaussianBlurImage
but it doesn't work on an ImagickDraw object. Do I need to compose my ImagickDraw onto an Imagick object first, then blur it, then compose it onto the main image?
Or are there some clever ImagickDraw functions I can use that I've not discovered yet?
Thanks
Solution
You can do that in ImageMagick, by creating a transparent background and adding text via label: using black text with a white stroke and then reducing the opacity. Then composite that latter onto your original.
Original:
convert image.jpg \( -background none -pointsize 64 -fill black -strokewidth 2 -stroke white -font arial -gravity center label:"stockphoto" -channel a -evaluate multiply 0.33 +channel \) -gravity center -geometry +0+50 -compose over -composite result.jpg
Answered By - fmw42 Answer Checked By - Mildred Charles (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.