#!/usr/bin/perl use warnings; use strict; use Image::Magick; my $image = Image::Magick->new; umask 0022; my @pics= <*.png>; my $ok; foreach (@pics){ $ok = $image->Read($_) and warn ($ok); } $image->Scale(geometry => '100x100'); $ok = $image->Write('thumb.png') and warn ($ok);