Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Image size an properties with perl?

Posted on 1998-11-18
2
Medium Priority
?
181 Views
Last Modified: 2010-03-04
I'm not sure this is possible but can perl be used to read gif and jpg image headers and retrieve width and height in pixles of the image?  The problem is I don't even know where this info is in the image headers let alone knowing how one could get it using perl.

Thanks
0
Comment
Question by:atia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 5

Accepted Solution

by:
b2pi earned 400 total points
ID: 1206356
Download and install

http://www.perl.com/CPAN-local/modules/by-module/Image/Image-Size-2.7.tar.gz

Then, do:


use Image::Size;

my($x, $y) = imgsize("something.gif");

0
 
LVL 5

Expert Comment

by:b2pi
ID: 1206357
One of the problems with autograding (allowing things to just get a 'C'), is that it sometimes becomes difficult to get your questions answered.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question