in reply to Re^2: Using ImageMagick effectively
in thread Using ImageMagick effectively

You need to prepend the directory to the filename (see readdir), and you can check if the read was successful:
my $dir = $vars{to_images}; ... my $err = $image->ReadImage("$dir/$_"); warn "$err" if $err;
Also, might be better to filter out the non-image files before passing to Image::Magick.