Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Image Magick Sucks!

by quidity (Pilgrim)
on Dec 07, 2000 at 06:20 UTC ( #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});


Comment on Re: Image Magick Sucks!
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2014-04-19 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (483 votes), past polls