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
In reply to newFromJpegData error by stormwolfen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |