hey... does anyone know how to create image using php... (school work). I tried using imagecreate and imagecreatetruecolor but all i get out is black screen with white square in the middle.... I'm using the example code from the php website and yeah... It ain't working... can anybody help?
This is the code:
"<?php
header("Content-Type: image/png");
// Create the size of image or blank image
$image = imagecreate(500, 300);
// Set the background color of image
$background_color = imagecolorallocate($image, 0, 153, 0);
// Set the text color of image
$text_color = imagecolorallocate($image, 255, 255, 255);
// Function to create image which contains string.
imagestring($image, 5, 180, 100, "GeeksforGeeks", $text_color);
imagestring($image, 3, 160, 120, "A computer science portal", $text_color);
imagepng($image);
imagedestroy($image);
?>
"