[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-AnyPerl] String to Image



John writes:

> I'd like to create a script that takes a string [say
> about 16 characters long] and converts into a graphic
> file that could be incorporated into a web page.

GD.pm is supposed to be capable of rendering text into
a gif image (though I've not tried this). GD is part of
the standard MacPerl distribution. Look in you "lib"
folder and take a gander at "GD.pod" to get started.

Of course, most "counters" use the trick of dynamically
altering the HTML code to sort of glue multiple pictures
together from a directory of individual digit images to
create the illusion of a single multi-digit number. I've
written scripts that have done a similar thing with
ornate text graphics using fonts, borders, colors, and/or
backgrounds that would be difficult to render with GD.

If you want basic text with no frills, GD should be
pretty effective. If you want something with a little
more flair, GD may make the task unnecessarily complex.

jay

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org