in reply to Re: Catching GD warning
in thread Catching GD warning
produces:use strict; use warnings; use GD; $SIG{__WARN__} = sub { print "Caught warning: ".$_[0] }; my $image; eval { ($image = GD::Image->new("test.jpg")) or warn "Error: ".$!; }; if ($@) { print "Caught ".$@; } if (defined($image)) { print "Image is defined: ".$image."\n"; }
What am I missing?Corrupt JPEG data: 104 extraneous bytes before marker 0xd9 Image is defined: GD::Image=SCALAR(0x817eba4)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Catching GD warning
by wazoox (Prior) on May 03, 2006 at 15:19 UTC |