Do you have a question? Post it now! No Registration Necessary. Now with pictures!
September 13, 2004, 6:52 pm
rate this thread
graphics from Perl. I cannot find the solution from the previous
postings in this newgroup or anywhere else on the net, but others seem
to have similar problems. So a rather lengthy description of the
problem. Apologies in advance !!!
I installed Perl 18.104.22.1680 from ActiveState (a couple of times). It
works very well in our Windows XP/administrator setup. Except when
printing graphs on data.
From the Perl Cookbook we got the idea of installing GD. The code
use GD::Graph::lines; ...
Started out by downloading from http://www.boutell.com/gd/ the windows
DLL (.zip) file. This extracts, but does not add any immediate support
for GD... because Perl complains that INC cannot see GD. Also the
bgd.dll and a few exe files does not seem to belong anywhere - except
in the newly extracted folder. Tried to copy these files to windows
and perl binary folders, but off course no action. Still, all the talk
about linking seemed to be for C-programmers and/or UNIX users. There
must be a way ...
Also some talk about libpng and zlib. Same argument, the necessary
code is hopefully available somewhere to copy or install.
In the boutell doc was the message: gd can also be used from Perl,
courtesy of Lincoln Stein's GD.pm library
(http://stein.cshl.org/WWW/software/GD /). Downloaded that zip info.
Here was a piece of (perl) code, starting out with
# create a new image
$im = new GD::Image(100,100);
which would produce a graphic image of a red circle. Extracted the new
zip-file, which should be ppm'ed to install. This did not work as the
'GD.PPD could not be found'. But on this group was a mention of a
working ppd, namely
ppm install http://theoryx5.uwinnipeg.ca/ppms/GD.ppd
which had a correct PPD and completed. PPM has acknowledged a version
1.27.2 is installed. And now the above mentioned "use GD;" in the perl
script is passed wihtout any problems. Unfortunately the last lines of
the example is
# And fill it with red
# make sure we are writing to a binary stream
# Convert the image to PNG and print it on standard output
Nothing happens, except for some nonsense characters being displayed
and the bell sounds a few times. Anybody has any idea ?
- » Bit::Vector objects serialized with Storable not working
- — Previous thread in » PERL Modules Announcements