hw to create a cake written text effect for a text

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
dt59
Posts: 63
Joined: 2017-07-25T23:57:06-07:00
Authentication code: 1151

hw to create a cake written text effect for a text

Post by dt59 »

https://drive.google.com/open?id=0Bzlo ... 5uSmEzSEk
please am trying to achieve the text effect{cake} on the above image. please somebody should help me.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: hw to create a cake written text effect for a text

Post by fmw42 »

You have not said what version of ImageMagick nor what platform. Please always provide that when asking questions, since syntax and scripting differ.

If on unix-like system, see my texteffect script at my link below.

Also you can try just adding a slight shadow to the text on a transparent background and then overlay that text image onto your background image. See
http://www.imagemagick.org/Usage/blur/#shadow
http://www.imagemagick.org/Usage/text/
http://www.imagemagick.org/Usage/fonts/
dt59
Posts: 63
Joined: 2017-07-25T23:57:06-07:00
Authentication code: 1151

Re: hw to create a cake written text effect for a text

Post by dt59 »

fmw42 wrote: 2017-08-02T09:53:49-07:00 You have not said what version of ImageMagick nor what platform. Please always provide that when asking questions, since syntax and scripting differ.

If on unix-like system, see my texteffect script at my link below.

Also you can try just adding a slight shadow to the text on a transparent background and then overlay that text image onto your background image. See
http://www.imagemagick.org/Usage/blur/#shadow
http://www.imagemagick.org/Usage/text/
http://www.imagemagick.org/Usage/fonts/
its on window cmd although am yet to make image magick work on my machine. but that's one of the reason i will want to pass through the stress to have image magick working on my machine
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: hw to create a cake written text effect for a text

Post by fmw42 »

Go to http://www.imagemagick.org/script/binar ... hp#windows and download the appropriate version of ImageMagick for your computer (32-bit vs 64-bit). Unpack the package, launch and follow the install instructions. Recommend taking all the optional check boxes.
dt59
Posts: 63
Joined: 2017-07-25T23:57:06-07:00
Authentication code: 1151

Re: hw to create a cake written text effect for a text

Post by dt59 »

fmw42 wrote: 2017-08-02T14:07:29-07:00 Go to http://www.imagemagick.org/script/binar ... hp#windows and download the appropriate version of ImageMagick for your computer (32-bit vs 64-bit). Unpack the package, launch and follow the install instructions. Recommend taking all the optional check boxes.
solved. could u please help me achieve that text effect on the image , please 8)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: hw to create a cake written text effect for a text

Post by fmw42 »

What version of ImageMagick do you have or did you install? If IM 7.0.x.x, then

Code: Select all

magick -size 320x100 xc:none -font Candice -pointsize 72 -fill white -annotate +24+64 'Anthony' -fill black -annotate +26+66 'Anthony' -fill lightblue -annotate +25+65 'Anthony' font_stamp.png
Image
dt59
Posts: 63
Joined: 2017-07-25T23:57:06-07:00
Authentication code: 1151

Re: hw to create a cake written text effect for a text

Post by dt59 »

thanks man, am finding it difficult to login to these website, alway logging out each time i click a link.
dt59
Posts: 63
Joined: 2017-07-25T23:57:06-07:00
Authentication code: 1151

Re: hw to create a cake written text effect for a text

Post by dt59 »

@pls fmw, am trying to write that text on an a image with these effect, can u help ??
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: hw to create a cake written text effect for a text

Post by fmw42 »

Once you have created the text image as above, you can composite it over your background image

Code: Select all

convert backgroundimage textimage -gravity GG -geometry +X+Y -compose over -composite resultimage
See
http://www.imagemagick.org/script/comma ... hp#gravity
http://www.imagemagick.org/script/comma ... p#geometry
dt59
Posts: 63
Joined: 2017-07-25T23:57:06-07:00
Authentication code: 1151

Re: hw to create a cake written text effect for a text

Post by dt59 »

fmw42 wrote: 2017-08-03T09:52:21-07:00 Once you have created the text image as above, you can composite it over your background image

Code: Select all

convert backgroundimage textimage -gravity GG -geometry +X+Y -compose over -composite resultimage
See
http://www.imagemagick.org/script/comma ... hp#gravity
http://www.imagemagick.org/script/comma ... p#geometry
i would not want to generate a textimage separately, i will just want to generate the text with the effects then position it on the background image.
i.e i would just want to read in one image and not two images.however my code is not working

Code: Select all

exec("magick img1.png font_stamp.png  -gravity GG -geometry +X+Y -compose over -composite resultimage.png",$outp, $return);
if ($return == "0") { echo '<br>Image generation sucssesful<br>'; } 
else { echo '<br>Image generation failed<br>'; } 

and finally, @fmw42 i really appreciate your time u use in answering my questions even if they are not concise . thnks man.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: hw to create a cake written text effect for a text

Post by fmw42 »

You have to insert the GG and +X+Y values. Did you not look at the links I specified for gravity and geometry? If you want to do it in one command, then

Code: Select all

convert cakeimage.png -font Candice -pointsize 72 -gravity center -fill white -annotate +0+0 'Anthony' -fill black -annotate +2+2 'Anthony' -fill lightblue -annotate +1+1 'Anthony' resultimage.png
Or use the full path to Candice.ttf if you do not have Candice in your type.xml file

Code: Select all

convert cakeimage.png -font path2/Candice.ttf -pointsize 72 -gravity center -fill white -annotate +0+0 'Anthony' -fill black -annotate +2+2 'Anthony' -fill lightblue -annotate +1+1 'Anthony' resultimage.png
Post Reply