chinamox has asked for the wisdom of the Perl Monks concerning the following question:
Most excellent monks-
I am trying to write a simple CGI program that will use the Image::Size module to display a given image’s dimensions to the user.
I have checked the archives using super-search and even though my code is basically the same as this code, I am still getting an error. Can someone please tell me what I am doing wrong here?
Thank you for your help,
-moxPS: I checked, and yes all three modules are installed on my server.
#!/usr/bin/perl use strict; use warnings; use CGI; use LWP::Simple qw(get); use Image::Size qw(imgsize); my $url = 'A STRING TAKEN FROM PATH_INFO'; my $img = get($url); my ($width, $height) = imgsize(\$img); print "$url is ${width}x${height}\n"; my $q = new CGI; # create new CGI print $q->header, $q->start_html('Image measuring'), $q->('The size of your image is:'), $q->("$url is {$x}x{$y}\n"), $q->end_html;
UPDATE: For some reason beyond this humble monk's understanding, the cgi is now working. Thank you for your time and thoughts.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using LWP and Image::Size to measure an image...
by stonecolddevin (Parson) on Dec 19, 2006 at 04:57 UTC | |
by chinamox (Scribe) on Dec 19, 2006 at 08:14 UTC | |
by SFLEX (Chaplain) on Dec 19, 2006 at 11:39 UTC | |
|
Re: Using LWP and Image::Size to measure an image...
by gt8073a (Hermit) on Dec 19, 2006 at 14:35 UTC |