Solved

Image size an properties with perl?

Posted on 1998-11-18
2
140 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

17 Experts available now in Live!

Get 1:1 Help Now