• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[PHP] Adding drop shadow on a font

Status
Not open for further replies.
Joined
May 11, 2008
Messages
513
Reaction score
99
Hello there!

I'm currently coding a image where you can change it via the URL, However, I want to add some drop shadow on my image such as:

http://habbcrazy.net/php/text.php?border=blue&t=Behind the Habbo...

I've currently got this.
PHP:
<? 
$font = $_GET['input1'];
    
    $font_file = '../_styling/fonts/volter.ttf';
    
    header("Content-type: image/png");
    
    $im = @imagecreate("235","69") or die();
    
    $transparant = imagecolorallocate($im, 51, 80, 124);
    ImageColorTransparent($im, $transparant);
    
    $img = imagecreatefrompng("../images/main/ad.PNG");
    imagecopy($im, $img, 0, 0, 0, 0, 235, 69); 
    
    $black = imagecolorallocate($im, 0x00, 0x00, 0x00);
    
    imagefttext($im, 13, 0, 6, 42, $black, $font_file, $font);
    
    imagepng($im);

    imagedestroy($im);

?>

Whick come out as:
http://habbocms.info/imager/event/TEST/

Off topic: I've also created this!

http://habbocms.info/imager/account/%HOTEL%/%HABBONAME%

such as
http://habbocms.info/imager/account/co.uk/temping:
http://habbocms.info/imager/account/co.uk/temping

Help would be appericated
 
Status
Not open for further replies.
Back
Top