Koozali.org: home of the SME Server

RPM

FireDog

RPM
« on: September 14, 2000, 12:54:07 AM »
Has anyone had any luck in getting GD.pm to work with e-smith. I've installed the rpm but can not get to work. Any ideas on what I can do.

Dan Brown

RE: RPM
« Reply #1 on: September 15, 2000, 05:08:48 PM »
GD is included by default in e-smith, I believe.  What are you trying to do, and what's happening?

FireDog

RE: RPM
« Reply #2 on: September 15, 2000, 06:42:11 PM »
Hi Dan
GD.pm is a Interface to gd Graphics Library
GD.pm is a port of Thomas Boutell's gd graphics library. GD allows you to create color drawings using a large number of graphics primitives.

A Simple Example:


        #!/usr/local/bin/perl



        use GD;
       
        # create a new image
        $im = new GD::Image(100,100);



        # allocate some colors
        $white = $im->colorAllocate(255,255,255);
        $black = $im->colorAllocate(0,0,0);      
        $red = $im->colorAllocate(255,0,0);      
        $blue = $im->colorAllocate(0,0,255);



        # make the background transparent and interlaced
        $im->transparent($white);
        $im->interlaced('true');



        # Put a black frame around the picture
        $im->rectangle(0,0,99,99,$black);



        # Draw a blue oval
        $im->arc(50,50,95,75,0,360,$blue);



        # And fill it with red
        $im->fill(50,50,$red);



        # make sure we are writing to a binary stream
        binmode STDOUT;



        # Convert the image to PNG and print it on standard output
        print $im->png;