- First of all there is a background image that cannot have any effects applied to it
- First text layer has a glowing background (like with gaussian blur) and this should blend into the background image without applying the effect to the background image
- Second layer of text right on top of it has a stroke and the text will be raised 1 px with a bevel
Code: Select all
<?php
$im = new Imagick('left_menu_bg.jpg');
$glowlayer = new Imagick();
$glowlayer->newImage( $im->getImageWidth(), $im->getImageHeight(), "transparent", "png" );
$glow = new ImagickDraw();
$glow->setFont ('arialbd.ttf');
$glow->setFontSize( 24 );
$glow->setGravity (Imagick::GRAVITY_CENTER);
$glow->setFillColor ('transparent');
$glow->setStrokeColor ('#ffffbe');
$glow->setStrokeWidth (8);
$glowlayer->annotateImage($glow, 0, 0, 0, 'Testy :P');
$glowlayer->gaussianBlurImage ( 0 , 5, imagick::CHANNEL_OPACITY );
I have been able to successfully create the top layer with the stroke, however I am unable to bevel the text on that layer. When I try to do raiseImage() it does it to the whole image, but I only want it on the text itself.
Any help you can give me would be great.