Solved

Image size an properties with perl?

Posted on 1998-11-18
2
145 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
perl CPAN issue 3 99
Problem with one substitution modifying another 3 60
File Find regex problem 4 60
Log File Creation with Header and Footer 17 59
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

910 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now