[thelist] Perl problem and question
Martin
martin at members.evolt.org
Sat Aug 4 18:14:54 CDT 2001
Hassan Schroeder wrote on 5/8/01 12:03 am
>"Perl is the duct tape of the Internet"
Also the force - it has a dark side, a light side and holds the universe
together.
Cheers
Martin
<tip type='perl image sizing'>
There's a handy Perl module called ImageMagick which has a bunch
of image functions, including finding the dimensions of an image.
Here's how you use it:
use Image::Size 'attr_imgsize';
#make sure that the ImageMagick module is in @INC -
#a special variable which tells Perl where to find included files
#like libraries and modules
@attrs = attr_imgsize($filename);
#where $filename is the full path to the image in question
$imagewidth=$attrs[1];
$imageheight=$attrs[3];
</tip>
_______________________________________________
email: martin at easyweb.co.uk PGP ID: 0xA835CCCB
martin at members.evolt.org snailmail: 30 Shandon Place
tel: +44 (0)774 063 9985 Edinburgh,
url: http://www.easyweb.co.uk Scotland
More information about the thelist
mailing list