Created
November 7, 2019 15:00
-
-
Save Jo0001/e7a09114601faab81886079c61400b32 to your computer and use it in GitHub Desktop.
Generate alphabetic character image with PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Content-Type: image/png"); | |
$im = @imagecreate(16, 16) | |
or die("Cannot Initialize new GD image stream"); | |
$background_color = imagecolorallocate($im, 255, 255, 100); | |
$text_color = imagecolorallocate($im, 0, 195, 10); | |
imagestring($im, 5, 4, 0, "A", $text_color); | |
imagepng($im); | |
imagedestroy($im); | |
//https://www.php.net/manual/en/function.imagecreate.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment