PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Coding & Tutorials (http://www.phpdig.net/forum/forumdisplay.php?f=31)
-   -   Generate text images on Linux (http://www.phpdig.net/forum/showthread.php?t=618)

Charter 03-05-2004 11:37 AM

Generate text images on Linux
 
Hi. Say you want to generate a GIF image containing some text. Assuming you have the PBM package that may come with Linux, just do the following from shell in the directory where you'd like the image to reside.
Code:

prompt> echo "some text" | pbmtext | pnmcrop | pnmpad -white -l2 -r2 -t2 -b2 > sometext.pnm
prompt> convert sometext.pnm sometext.gif
prompt> rm sometext.pnm

This would produce the image shown here.

Remember to remove any "word" wrapping in the above commands.


All times are GMT -8. The time now is 03:39 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.