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.
In reply to Using LWP and Image::Size to measure an image... by chinamox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |