#!/usr/bin/perl use strict; use warnings; use GD; use File::Find; my $file= shift; open(my $imgFile, '<', $file ) or die "Can't read $file: $!\n"; binmode $imgFile; my $img= newFromGif GD::Image( $imgFile ); close($imgFile); die "Didn't work" unless defined $img; my ($w, $h)= $img->getBounds(); print $file,": ",$w," x ",$h,"\n";