#! /usr/bin/perl # resize700.pl - bulk image resizing with USM for web use use strict; use warnings; use Image::Magick; foreach my $filename (@ARGV) { (my $new_filename = $filename) =~ s/\.jpg$/.700.jpg/i; my $image = Image::Magick->new(size=>'700x700'); $image->Read($filename); $image->Resize(geometry=>'700x700',support=>'1'); $image->UnsharpMask(radius => 2, sigma => 1.0, amount => 0.4, threshold => 0.02); $image->Write(filename=>$new_filename,quality=>85); }