how to -draw text and -shadow it?

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
silversonicaxel
Posts: 10
Joined: 2013-12-19T07:00:20-07:00
Authentication code: 6789

how to -draw text and -shadow it?

Post by silversonicaxel »

Hi guys,
I'm printing some text on an image with convert and I would like to decorate the text with a black shadow, I'm trying -blur or -gaussian but i cannot apply to the text, it is applied to the background image.
i need to use -draw command and not -annotate
and this is the code I need to update for shadowing

Code: Select all

-font "geometricslab703bt-bold-webfont.ttf" -fill White -pointsize 18 -draw "rotate -4 text 350,250 '---- mijn ideale ----'" 
thanks in advance
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: how to -draw text and -shadow it?

Post by snibgo »

It could be something like this Windows script.

Code: Select all

convert ^
  -size 600x400 ^
  xc:none ^
  -fill white ^
  -draw "rotate -4 text 350,250 '---- mijm ideale ----'" ^
  ( +clone -background black -shadow 100x3+5+5 ) ^
  +swap ^
  -background pink ^
  -layers merge  ^
  d.png
I have flattened against a pink background so we can see the white letters.
snibgo's IM pages: im.snibgo.com
Post Reply