IMGSIZE(1)
π IMGSIZE(1) β the one where your bestie tells you how big an image is
okay so this is imgsize, a lil User Contributed Perl Documentation page that literally just reads the dimensions of an image in several popular formats. that's it. that's the whole vibe. π
β¨ NAME β¨
imgsize β read the dimensions of an image in several popular formats
π¦ USAGE π¦
imgsize [ -r | -a | -f fmt ] file [ file ... ]
π DESCRIPTION π
genuinely a no-brainer, bestie. you hand it an image on the command line and it tells you how big it is. that's the whole job. all the actual heavy lifting is done over in Image::Size, so this lil script is just the aesthetic front desk. π
πΈ REQUIRED ARGUMENTS πΈ
imgsize expects file names on the command-line, periodt. and here's a cute detail: if you give it more than one file, it'll slap the file name into the output so you know which numbers belong to who. thoughtful icon behaviour, honestly.
% imgsize dot.gif
width="16" height="16"
% imgsize dot.gif dash.gif
dot.gif: width="16" height="16"
dash.gif: width="32" height="8"
π₯ OPTIONS π₯
so by default the width and height come back as attributes for an IMG tag in HTML β basically width="40" height="30" or whatever. but if that's not your vibe, the following options give you alternate formats. and lowkey important: all of them report width first, then height. π«Ά
-rβ return "raw" format data. just the numbers, separated by a single space. nothing else. minimal. clean. main character energy.-aβ return a Perl-style list of attributes suitable for passing to theimg()method of the CGI module (see CGI). iykyk.-ffmt β pass the string you specify in fmt tosprintf, so you can format the results exactly to your taste. heads up though:sprintfgets passed two numbers, so any other formatting directives will be lost π. the numbers go in width first, then height.
π EXIT STATUS π
imgsize always exits
no, that's not a typo, that's the entire section. it always exits. it's giving mysterious. it's giving "we don't talk about that". π
π BUGS π
please report any bugs or feature requests to bug-image-size at rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Image-Size>. the deal is: the author gets notified, and then you automatically get notified of progress on your bug as changes get made. so you're both in the loop, cute. β¨
π SUPPORT π
here's where to find your people:
- RT: CPAN's request tracker β <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Image-Size>
- AnnoCPAN: Annotated CPAN documentation β <http://annocpan.org/dist/Image-Size>
- CPAN Ratings β <http://cpanratings.perl.org/d/Image-Size>
- Search CPAN β <http://search.cpan.org/dist/Image-Size>
- Project page on GitHub β <http://github.com/rjray/image-size>
π LICENSE AND COPYRIGHT π
copying and distribution are permitted under the terms of the Artistic License 2.0 (<http://www.opensource.org/licenses/artistic-license-2.0.php>) or the GNU LGPL 2.1 (<http://www.opensource.org/licenses/lgpl-2.1.php>). go wild, just respect the license bestie π
π§ SEE ALSO π§
Image::Size β that's where the actual magic lives, fr fr
π AUTHOR π
Randy J. Ray <rjray@blackperl.com>.
and that's a wrap, bestie π this page is from perl v5.42.0, dated 2021-03-01 β go measure some images and slay π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Image-Size 3.300-bp160.1.12 Β· LGPL-2.1-only OR Artistic-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms