Solved

Image size an properties with perl?

Posted on 1998-11-18
2
159 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
  • 2
2 Comments
 
LVL 5

Accepted Solution

by:
b2pi earned 200 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…

821 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