in reply to decode jpg header

Image::Size will give you the dimensions of a jpg. That's a start.

Replies are listed 'Best First'.
Re: Re: decode jpg header
by tadman (Prior) on Feb 20, 2001 at 10:42 UTC
    Image::Size, I have to admit, is very slick. I was porting an old program of mine that unpacked GIF and JPG, but decided to check CPAN just for the heck of it. Sure enough, there was this gem.

    For something so simple in concept, it is implemented quite thorougly. It will parse many different formats, and it returns the information in a highly dynamic way, so you can literally drop the results into CGI.pm for your <IMG> tag. Very interesting.

    From the docs:
    $r->print($Q->img({-src => $imgpath, attr_imgsize($r->lookup_uri($imgpath)->filename +) }));