Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

RE: Re: Using GD.pm

by BBQ (Curate)
on Jul 19, 2000 at 05:34 UTC ( [id://23116]=note: print w/replies, xml ) Need Help??


in reply to Re: Using GD.pm
in thread Using GD.pm

Nope! GD supports jpeg just fine... At least, this works for me:
use GD; open(IMAGE, 'foo.jpg') or die("Can't open foo.jpg: $!"); my $im = newFromJpeg GD::Image(IMAGE) or die("Can't create image from foo.jpg: $!"); my ($w,$h) = $im->getBounds(); close(IMAGE); print "foo.jpg is $w x $h\n"; ^d foo.jpg is 1024 x 768
I guess it might help if our GD-using-AM-poster ran the script from console first, or at least used CGI::Carp instead of just reporting the 500 error... That way we might actually know what the error was, and not just know that there was an error. Oh well, the above works fine for me.

#!/home/bbq/bin/perl
# Trust no1!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found