This question stems from me trying to figure out how to properly use Perl’s CGI and GD modules.
Basically I am trying to write a cgi that will us GD to draw a black frame around a given image. I want to image to load from a url. So far from the Perldoc I have constructed this:
use Image::Size qw(imgsize);
use LWP::Simple qw(get);
my $myImage = get(‘http://www.someurl.net/sample.jpg’);
my ($x, $y) = imgsize(\$myImage);
my $image = GD::Image->newFromJpegData("http://www.someurl.net/sample.
my $black = $image->colorResolve(0,0,0);
I am now a confused as to how I could print out the $image inside of a CGI rendered webpage like this:
my $cgi = new CGI;
$cgi->h1('it’s a framed picture!'),
Many thanks in advanced for all, advice, observations and clarifications.