stormwolfen has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use GD; use Tk; use Tk::JPEG; use MIME::Base64; # Create the main window my $main = MainWindow->new(); open (FILE, 'd:\test\found.B64') or die "Cannot open found.b64: $!"; my $encoded = join "", <FILE>; close FILE; my $im = GD::Image->newFromJpegData($encoded);
I have also tried using:
use strict; use GD; use Tk; use Tk::JPEG; use MIME::Base64; # Create the main window my $main = MainWindow->new(); open(JPG, 'd:\test\found.b64') or die "Cannot open found.b64: $!"; my $jpegdat; read JPG, $jpegdat, -s JPG; my $im = GD::Image->newFromJpegData($jpegdat);
But in either case I get the following error on the newFromJpegData line. Can't locate object method "newFromJpegData" via package "GD::Image". I am on a Win 2000 system.
Has anyone encountered this, or have a suggestion on what may be wrong? I have all the modules loaded and tested it earlier in the code using GD::Image->newFromJpeg('found.jpg') successfully. I have also tested the file and the base64 is a valid jpeg.
-- Scott
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: newFromJpegData error
by atcroft (Abbot) on Dec 18, 2001 at 11:57 UTC | |
|
Re: newFromJpegData error
by Steve_p (Priest) on Dec 18, 2001 at 18:17 UTC | |
by stormwolfen (Acolyte) on Dec 18, 2001 at 20:23 UTC |