Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I can access the image URL in my browser just fine, so it can't be a permission problem. Anyone have any ideas what might be wrong?
use Image::Info qw(image_info dim); my $img_info = image_info("http://www.myurl.org/pictures/$pic_id.jpg") +; my ($h, $w) = dim($img_info); print "$h and $w, check the URL of image at http://www.myurl.org/pictu +res/$pic_id.jpg"; my ($max_width, $max_height ) = (800, 600); my ($width_factor, $height_factor) = ($max_width/$width, $max_height/$ +height); if ($width_factor < 1 || $height_factor < 1) { my $factor = ($width_factor < $height_factor ? $width_factor : $hei +ght_factor ); $width = int($width * $factor + 0.5); $height = int($height * $factor + 0.5); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ImageInfo errors
by Joost (Canon) on Feb 22, 2007 at 20:26 UTC | |
|
Re: ImageInfo errors
by zentara (Cardinal) on Feb 22, 2007 at 21:39 UTC | |
by ikegami (Patriarch) on Feb 22, 2007 at 22:38 UTC |