##
my ($param,$dir,$newWidth,$newHeight,$newQuality)= @ARGV;
##
##
my @tmp = split(/\\/,$0);
my $name = $tmp[-1];
##
##
croak "Wrong number of parameters at" unless @_ == 3;
##
##
my ($file, $newWidth, $newHeight) = @_;
##
##
open(JPEG,">new$file")
##
##
if ( $_[3] ) { $quality = $_[3] if ( $_[3] =~ /[1..100]/ ) ; }
##
##
if (-f $dir) { changesize ($dir ... }
else { # do the loop
##
##
my @onlyFiles= grep {{-f "$dir/$_" and /jpe?g$/} readdir(DIR);