Introduction
One of the frequent things we have had to do on a website is create graphic
banners of text for use in menus. eg. the Zope > Text2Image graphic above.
In order to make this easier and to allow the automatic generation of banners from within Zope from object attributes we created a Product that does this automatically.
Pre-requisites
Text2Image requires gd and the
associated python wrapper gdmodule.
It has been tested on FreeBSD, but should work on any Unixish system.
Usage
Once installed, you can add a Text2Image instance anywhere in your Zope site.
Once added, click on it and edit the properties to suit your needs:
Attribute | Description | |
base | The base image to use, this should be a full path to and image on the filesystem | |
font | The font file to use. It supports Truetype and Type1 fonts. This should be the full path to the font file on the filesystem | |
size | The size in points to render the text | |
x | The x position of the text | |
y | The y position of the text | |
colour | The colour of the text in the hex form #rrggbb |
You can then generate an image via the web like: http://www.netsight.co.uk/t2i/this+is+cool.png where t2i is my Text2Image instance and I want to render the string 'this is cool'. The string should be url quoted (eg. urllib.quote_plus) and have .png on the end.
Download:
Release | Version | Date | Size |
| 0.1 (Development) |
2002/06/06 |
1716 bytes |
