From Trivial Crane, 4 Years ago, written in PHP.
Embed
  1. <?php
  2.     $width = 640;
  3.     $height = 480;
  4.     $text = "THIS IS A TEST FROM JOHN";
  5.     $fontsize = 5;
  6.  
  7.     $img = imagecreate($width, $height);
  8.  
  9.     // Transparent background
  10.     $black = imagecolorallocate($img, 0, 0, 0);
  11.     imagecolortransparent($img, $black);
  12.  
  13.     // Red text
  14.     $red = imagecolorallocate($img, 255, 0, 0);
  15.     imagestring($img, $fontsize, 0, 0, $text, $red);
  16.  
  17.     header('Content-type: image/png');
  18.     imagepng($img);
  19.     imagedestroy($img);
  20. ?>
  21.  

Replies to Text to PNG rss

Title Name Language When
Re: Text to PNG test php 4 Years ago.