PAID: 3d Text on the fly

Do you need consulting from ImageMagick experts and are willing to pay for their expertise? Or are you well versed in ImageMagick and offer paid consulting? If so, post here otherwise post elsewhere for free assistance.
Post Reply
djolip
Posts: 4
Joined: 2015-12-18T07:11:20-07:00
Authentication code: 1151

PAID: 3d Text on the fly

Post by djolip »

Hi there,
i want to creat an image like this example:
Image
Or lile this one the text in an other color:
Image

The text should be generated on the fly and should like this picture. I mean the 3d / emboss effect of the text.
Can someone provide a code for that? Additonally a rounded rectangle should be created, not filled. you see this in Image Number 2, there it is red.
Imagemagick is running on an webserver as command line. Version ImageMagick 6.7.7-10
Thanks in advance
Hope someone can help me and please say what you get for this work :-)

Kind Regards
Oli P
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PAID: 3d Text on the fly

Post by fmw42 »

What about the circle of stars and the "D" below it? Do you know the font being use or any font is OK? What is the platform?

Is this what you want? Unix syntax.

Code: Select all

convert \
\( -size 500x100 xc:none -fill white -stroke red -strokewidth 5 -draw "roundrectangle 0,0 499,99 20,20" \) \
\( -size 480x80 -background none -gravity center -fill red -stroke red -font arial -strokewidth 0 label:"HH  NM  250" \) \
\( -clone 1 -background black -shadow 60x1+1+1 \) \
\( -clone 2 -clone 1 -background none -layers merge +repage \) \
-delete 1,2 -gravity center -compose over -composite licenseplate.png
Image

I am not yet sure why the roundrectangle is not smoother. I suppose it is due to the less accurate MSVG that -draw uses.

Here is an alternate that uses SVG (on my system I have RSVG delegate to render it).

Code: Select all

echo "<?xml version='1.0' standalone='no'?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg viewBox='0 0 500 100' xmlns='http://www.w3.org/2000/svg' version='1.1'>
<g id='roundrect' fill='none'>
<rect x='3' y='3' width='495' height='95' fill='none' stroke='red' stroke-width='5' rx='20' ry='20'/>
</g>
</svg>" > tmp.svg
convert -background none RSVG:tmp.svg \
\( -clone 0 -alpha off -fill white -draw "color 250,50 floodfill" \) \
\( -clone 0 -alpha extract -fill white -draw "color 250,50 floodfill" \) \
-delete 0 -alpha off -compose copy_opacity -composite \
\( -size 480x80 -background none -gravity center -fill red -stroke red -font arial -strokewidth 0 label:"HH  NM  250" \) \
\( -clone 1 -background black -shadow 60x1+1+1 \) \
\( -clone 2 -clone 1 -background none -layers merge +repage \) \
-delete 1,2 -gravity center -compose over -composite licenseplate2.png
rm -f tmp.svg
Image
Post Reply