note 6754 deleted from function.imagecolortransparent by jimw

From: Date: Thu, 20 Dec 2001 22:01:13 +0000
Subject: note 6754 deleted from function.imagecolortransparent by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23464@lists.php.net to get a copy of this message
For example: <? $font = "./Arial.ttf"; $font_size = 18; $font_angle = 0; $width = 300; $height = 400; $text = "test"; $im = ImageCreateFromJpeg("./test.jpg"); $im_str = ImageCreate($width,$height); $black = ImageColorAllocate($im_str, 0, 0, 0); $white = ImageColorAllocate($im_str, 255, 255, 255); ImageColorTransparent($im_str, $black); ImageTTFText($im_str, $font_size, $font_angle, 0, 15, $white, $font, $text); ImageCopyResized($im,$im_str,0,0,0,0,$width,$height,$width,$height); ImageInterlace($im, 1); header("Content-type: image/jpeg"); ImageJpeg($im); ImageDestroy($im_str); ImageDestroy($im); ?> if you disable the function ImageColorTransparent(), you will be able to see a black rectangle on the upper left conner.

« previous php.notes (#23464) next »