How to turn a number into graphics?

  • Thread starter http://links.i6networks.com
  • Start date
H

http://links.i6networks.com

Any free scripting turning numbers into a graph?

Similar to an image/graphics counter. PHP or Perl
 
I

Iain Chalmers

http://links.i6networks.com said:
Any free scripting turning numbers into a graph?

Similar to an image/graphics counter. PHP or Perl

If you're planning on using this on a website, the easiest way is to
make 10 image files, one with each digit on it, and just have a simple
script to insert the required image tags into the html.

If you _really_ need to be dynamically generating images, the GD module
is a simple way to do simple things, and the various Image::Magik
modules will allow you to manipulate complex images in complex ways...

http://search.cpan.org/~lds/GD-2.16/GD.pm

http://search.cpan.org/~jcristy/PerlMagick-6.02/Magick.pm

There are about 250 other modules with "Image" in their name on CPAN
too, but I've never used any of them so can't comment on them...

(looking through that list though, I'm going to have to make some time
to play with a few of them... Image::EXIF, Image::Thumbnail,
Image::Timeline, Image::Worldmap... Where was I when these modules were
announced I weonder... Oooh, I just noticed ImagePwd and
GD::SecurityImage - one of them might be what the original poster
needs...)

big
 
G

Greg Brant

the GD library has the ability to create graphics on the fly.

have a look

$myNumber = 648;

// create new image
$myImage = imageCreate(100 ,100);
// load a font
$font = imageLoadFont('str file name'); // you will need to read into this
function cos i cant be bothered, its in the manual

imageString($myImage, $font, 10,10, $myNumber, 250);



the image functions page in the php manual shows how you can output an image
directly to the browser or
write a file to the webserver to use later
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,880
Members
47,417
Latest member
DarrenGaun

Latest Threads

Top