#!/usr/bin/perl -w use Image::Size; use LWP::Simple; use Carp; use strict; { my $loc = "http://perlmonks.org/images/usermonkpics/httptech.gif"; my $img = get $loc or croak "Can't get $loc!"; # when the argument passed to imgsize # is a reference (as opposed to a # simple scalar), it assumes it's # pointing to an in-memory buffer, # instead of to a filename. my ($width, $height) = imgsize(\$img); print "Width: $width\n", "Height: $height\n"; }
[ ar0n ]
In reply to (ar0n) Re: Checking Image Size
by ar0n
in thread Checking Image Size
by r3b3lxd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |