[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] JPEG question



beany@nando.net wrote:

> I found the Image::size package in CPAN but I don't
> understand it well enough to make it work with MacPerl... I tried
> extracting the jpegsize subroutine, but I couldn't modify it enough to
> work by itself.

Well, I'll take a crack at this one since I posed much the same question
a few months back. I think Image::Size is the way to go. To use the file
with MacPerl you must work around the autosplit function. Detailed
instructions for using this module with MacPerl were given on this list
a few months ago. Rather than reprinting them here, I will suggest you
go the archives I maintain at
http://www.binary.net/dturley/macperl/search.html and search for
image::size (select the "last 6 months" option) I just did this and was
presented with the details.

As for using it;

use Image::Size;

($x, $y) = imgsize("some.jpg");#extract height and width tags

# $x is the width and $y is the height

Of course, it works for a variety of images.

HTH,

David

_____________________________________________________________________
David Turley
dturley@pobox.com
http://www.pobox.com/~dturley

"You don't want to be the only person sitting on a crocodile's back."
                                        -- heard on a PBS nature show
______________________________________________________________________

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch