Since I have finished my semester, I thought I “restart” programming a bit. Here’s a small contribution to the script. This is a separate script that would run in conjunction with image.php and gives you the ability to split the words to make single letters, which makes long texts to images possibles. Beware of bandwidth cost though, they are MASSIVE! This might be ressource hungry, I’d recommand having cache on so it can cache each letters.
You can use the function image(); to translate your text into images. If you have any problems, drop a comment with the problem you’re experiencing.
Source: Text to image Version 1.0.1 Alpha
This is a simple script using http://www.artypapers.com/csshelppile/pcdtr/
text to image script.
This script breaks words apart so each letters can be printed invidually
and if the image is not shown, you’ll see the text instead (composed by
each letters the image was suppose to show.
Usage:
INSERT at the beginning of your page in a PHP section
// Call the texttoimage script
include(“text.php”);
TO USE:
call the function image() with the text as a parameter.
ex. image(“I want some coffea”);
Version 1.0 Alpha
+ Variable text to make a 1 call include(text.php?text=your text here);
1.0.1
+ Using preg_split instead of str_split for PHP 4.0 compatibility
To do list:
- Make each letter a different color