Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Image Magick Sucks!

by quidity (Pilgrim)
on Dec 07, 2000 at 06:20 UTC ( [id://45419]=note: print w/replies, xml ) Need Help??


in reply to Image Magick Sucks!

The GD.pm library does what you seem to want, and it doesn't suck. At least as far as I've used it.

You can initialise from PNG, Jpeg, WBMP,GD or XBM formats, for others you might need to shop around the CPAN a bit and see what turns up.

In addition to simple setting of pixels, it also allows you to add text in various orientations, make polygons and draw lines to your heart's content.

For instance, this is a snippet of a script which draws a hexagon:

my @pts = ( [$x1 + $ba, $y1 - $b1], [$x1 - $ba, $y1 - $b1], [$x1-2*$ba, $y1 ], [$x1 - $ba, $y1 + $b1], [$x1 + $ba, $y1 + $b1], [$x1+2*$ba, $y1 ], ); my $poly = new GD::Polygon; $poly->addPt(@{$pts[$_]}) for (0..5); $im->polygon($poly, $cols{BG});

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://45419]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-24 08:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found