4umi.com/image/text

Imaged text

4umi web

To display text in ways not possible by today's browsers, you can use an image. Text can be formatted in an image editing program with fading colours, in curves and whatnot. But to have a webserver automatically generate a textual image (or pictoral text, whichever way you look at it) when a special url is called for, gives an unsurpassed freedom.

The idea

A php script which outputs an image according to several parameters that are passed in the url, can be found at http://4umi.com/image/text.php and put to use like so:

On the side

Virtuti sacrum

The parameters

The parameters that can be used, are:

ParameterDefault ValueRemarks
textHello world.Use '\a' to write an '@'
fonttimesSee the full list at web/font/
size12in pixels
angle090 is straight up, -90 is down
colorblackhexadecimal code, one of
the 16 names or 'random'.
backwhite

The text can be slanted along all 360 degrees. Strings longer than 700 pixels (in any direction) may be cropped.

A note on colour

For colours the hexadecimal notation in #rrggbb format is used, although the hash (#) is optional. Both the color and background parameters can be set to 'random'. The script will then choose one from the 16 standard colours and make sure it is not the same as the other, but a proper contrast cannot be guaranteed.

The 16 named colours are:

The 16 named colours
blackgray silverwhite
redmaroon purpleyellow
greenolive teallime
bluenavy fuchsiaaqua

A problem with width and height

The image does not exist until the script has built it, and the dimensions are not known until it is finished. Thus it is not possible to specify the width and height attributes in the HTML-code of the page where the image is to be displayed. This prohibits a proper validation of the document against the accepted standards set by the W3C, but in normal browsers the image will eventually display just fine.

Interactive text

Create your own imaged text by filling in the necessary details in the form below.







sample