IMGSIZE(1p)

πŸ“¦
version 3.300 Β· 4 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– IMGSIZE(1p) πŸ’–

okay bestie, so this is imgsize β€” it's a lil command-line cutie that reads the dimensions of an image, and it's from the Perl world (user-contributed perl documentation, iykyk πŸ’…).

✨ NAME ✨

imgsize β€” read the dimensions of an image in several popular formats πŸ‘‘

🌸 USAGE 🌸

imgsize [ -r | -a | -f fmt ] file [ file ... ]

πŸ¦‹ DESCRIPTION πŸ¦‹

No-brainer, fr fr β€” you just hand it an image on the command-line and it tells you how big it is. That's it. That's the whole vibe.

All the real work is done in Image::Size, so like, imgsize is basically the face card and Image::Size is doing the actual labor. πŸ’…

πŸŽ€ REQUIRED ARGUMENTS πŸŽ€

imgsize expects file names on the command-line, periodt. If you give it more than one file, the file name gets included in the output too so you know which is which:

% imgsize dot.gif
width="16" height="16"
% imgsize dot.gif dash.gif
dot.gif: width="16" height="16"
dash.gif: width="32" height="8"

see how the multi-file one labels everything? obsessed. 🌈

⭐ OPTIONS ⭐

By default, the width and height come back as attributes for an IMG tag in HTML β€” basically "width="40" height="30"" or something like that. The following options let you get alternate formats instead. And lowkey important: all of them report width first, then height. πŸ‘‘

  • -r β€” returns "raw" format data. Just the numbers, separated by a single space. no frills, no drama. πŸ’€
  • -a β€” returns a Perl-style list of attributes, suitable for passing to the "img()" method of the CGI module (see CGI). very slay if that's your thing.
  • -f fmt β€” pass the string you put in fmt to "sprintf" and it'll use that to format the results to your taste. Heads up though: "sprintf" gets passed two numbers, so any other formatting directives will be lost 😭. The numbers go in width first, then height.

πŸ’œ EXIT STATUS πŸ’œ

imgsize always exits.

(that's it. that's the whole section. iconic brevity, honestly. ✨)

πŸ™ˆ 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>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. 🫢

(so like, you file it, they know, you know β€” the whole notification circle of life.)

πŸ’– SUPPORT πŸ’–

  • 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>

lots of places to find your people, bestie. go say hi. 🌸


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>). πŸŽ€

🌟 SEE ALSO 🌟

Image::Size

πŸ‘‘ AUTHOR πŸ‘‘

Randy J. Ray "<rjray@blackperl.com>".


and that's the whole page, bestie!! πŸ’– this one's running on perl v5.36.0, dated 2022-10-13, and it lives in section IMGSIZE(1p). go measure some images, you main character. βœ¨πŸ¦‹πŸ’…

πŸ“¦ where this page comes from