PHP Classes

Align and justify text in image: Create image with aligned text

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 2,033 All time: 1,928 This week: 91Up
Version License PHP version Categories
textaligninimage 1.2Freely Distributable5.0PHP 5, Graphics


This class can be used to generate an image with aligned text in it.

It creates an image with a given width and height and renders a text string in it.

The text may be align to the left, right, center or justified relatively to the image width.

The text font, size, background and foreground colors are configurable.

The generated image may be served as the current script output or stored in a server side file in the PNG, JPEG or GIF formats.

Picture of Taslim Mazumder Sohel
Name: Taslim Mazumder Sohel <contact>
Classes: 2 packages by
Country: Japan Japan
Age: ???
All time rank: 6292 in Japan Japan
Week rank: 441 Up3 in Japan Japan Down

  Files folder image Files  
File Role Description
Accessible without login Plain text file img.php Example Example File
Plain text file TextToImage.class.php Class Class File

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:1,928
This week:91Up
User Comments (2)