Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Capture Height & Width of a Image (eps extension) file

by Srini (Initiate)
on Feb 27, 2008 at 10:14 UTC ( [id://670570]=perlquestion: print w/replies, xml ) Need Help??

Srini has asked for the wisdom of the Perl Monks concerning the following question:

Hi Experts,

I need to capture the width and height of a image (particularly eps extension) file.

I have used Image::Size module, but it is not supporting the "eps" extension format.

Could you please suggest anyone, what's the appropriate module for this requirement with some example?

Thanks in advance.

P. Srinivasan
  • Comment on Capture Height & Width of a Image (eps extension) file

Replies are listed 'Best First'.
Re: Capture Height & Width of a Image (eps extension) file
by marto (Cardinal) on Feb 27, 2008 at 10:25 UTC
Re: Capture Height & Width of a Image (eps extension) file
by zentara (Cardinal) on Feb 27, 2008 at 16:31 UTC
    I just found that it worked with Image::Magick.

    Output:

    GD-graph1.eps is 200x200 200 200 120068 PS
    The script I used is:
    #!/usr/bin/perl -w use Image::Magick; my $x = $ARGV[0]; my $image; $image = Image::Magick->new; $image->Read($x); my ($w,$h)= $image->Get('columns','height'); print $x,' is ',$w.'x'.$h,"\n"; #this is very inneficient memory wise, use Ping ($width, $height, $size, $format) = $image->Ping($x); print $width,"\n", $height,"\n" ,$size,"\n", $format,"\n";

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum
Re: Capture Height & Width of a Image (eps extension) file
by ambrus (Abbot) on Feb 27, 2008 at 11:42 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://670570]
Approved by wfsp
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2025-11-14 20:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (71 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.