in reply to finding jpeg pixel size
use Image::MetaData::JPEG; ( $w, $h ) = Image::MetaData::JPEG->new($fname)->get_dimensions; [download]