Add border to text with texture

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
Millydelev
Posts: 1
Joined: 2016-11-30T23:06:12-07:00
Authentication code: 1151
Location: Ahmedabad

Add border to text with texture

Post by Millydelev »

how would you create an inner drop shadow in text?
The outer one is documented in php
e.g. outer light drop shadow to create 'cut-out' text :
$layer = $text_layer->clone();
$layer->setImageBackgroundColor( new ImagickPixel( 'white' ) );
$layer->shadowImage( 70, .3, 1, 1 );
But how would you create an inner drop shadow?
Thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Add border to text with texture

Post by fmw42 »

Neither Imagemagick nor Imagick have an innershadow command. You will have to script that from multiple commands.

This is one way to get an innershadow in command line:

Code: Select all

convert -size 600x -background black -bordercolor black -border 10 \
-fill white -font Arial -pointsize 124 label:"TESTING" \
-negate -background black -alpha background -alpha copy -background black  -shadow 80x3+5+5 \
-compose over -background white -flatten -shave 10x10 result.png
Please always provide your Imagemagick version and platform with your posts.

It would also help if you provide and example image of what you want to do.
Post Reply