KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How to create an image with GDlib with a transparent background? header('content-type: image/png'); $image = imagecreatetruecolor(900, 350); imagealphablending($image, true); imagesavealpha($image, true); $text_color = imagecolorallocate($image, 0, 51, 102); imagestring($image,2,4,4,'Test',$text_color); imagepng($image); imagedestroy($image); Here the background is black
Tags (comma-separated)
Save Edits
Cancel