PHP Classes

Pure PHP Text Render: Render text in an image in pure PHP

Recommend this page to a friend!
  Info   View files Example   Demos   Screenshots Screenshots   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 56%Total: 624 All time: 5,064 This week: 89Up
Version License PHP version Categories
pure-text-render 1.0GNU Lesser Genera...4.0PHP 5, Graphics, Text processing


This class can render text in an image in pure PHP.

It can create an image rendering a given text in it. The text may have line break characters to split the text in multiple lines.

The class contains the definition the bitmaps of each character of the supported built-in font.

The rendered text can be scaled or rotated.

The image can be saved in BMP format without using the GD or any PHP image extension.

Innovation Award
PHP Programming Innovation award nominee
August 2014
Number 2

Prize: One year server license IP to country, region, city, latitude, longitude, ZIP code, time zone, area code database
PHP can used the GD extension to create images with text rendered on them. However, sometimes it is not possible to use the GD extension for some reason.

This class provides an alternative solution for creating images with text using pure PHP code that does not use the GD extension.

Manuel Lemos
Picture of Abius X
  Performance   Level  
Name: Abius X is available for providing paid consulting. Contact Abius X .
Classes: 4 packages by
Country: Iran Iran
Age: 36
All time rank: 114810 in Iran Iran
Week rank: 216 Up3 in Iran Iran Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x


require_once __DIR__."/pure_text_render.php";
$obj=new PureTextRender();
$text="Hello there people!".PHP_EOL."This is rendered using only PHP...";

  Online SampleExternal page  

Open in a separate window

  • captcha.jpg
  • rotated.jpg
  • screenshot1.png
  • screenshot2.png
  Files folder image Files  
File Role Description
Plain text file pure_text_render.php Class main class file
Accessible without login Image file captcha1.bmp Output sample generated CAPTCHA
Accessible without login Image file captcha2.bmp Output sample generated CAPTCHA
Accessible without login Plain text file example.php Example sample usages
Accessible without login Plain text file example_captcha.php Example PureCaptcha Example
Plain text file pure_captcha.php Class Generate Nice Pure Captchas Using PureTextRender

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,064
This week:89Up
User Ratings User Comments (1)
 All time
very good
9 years ago (hassan ahmadi)