• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

Image size an properties with perl?

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
atia
Asked:
atia
  • 2
1 Solution
 
b2piCommented:
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
 
b2piCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now