in reply to decode jpg header

Searching CPAN for "image" turns up Image::Info