Front page | perl.beginners |
Postings from March 2002
GD getBounds problem
Thread Next
From:
Agustin Rivera
Date:
March 20, 2002 12:20
Subject:
GD getBounds problem
Message ID:
000e01c1d04c$65fc73e0$cbfea8c0@agustinr
I have a problem. The code below creates the error below. I can't see what
is wrong with it. I could of swore this code used to work.
Any ideas?
use GD;
use LWP::Simple;
use strict;
### GET IMAGE ATTRIBS
<.. bunch of code that gets an image off the web and writes it to disk
successfully ..>
open(OUT, ">image.jpg") or die $!;
binmode(OUT);
print OUT $content;
close(OUT);
my $image=GD::Image->newFromJpeg("image.jpg");
my ($width,$height)=$image->getBounds();
Error:
Can't call method "getBounds" on an undefined value at ./sendanf.pl line 32.
Thanks,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
Thread Next
-
GD getBounds problem
by Agustin Rivera