App-ImageMagickUtils
view release on metacpan or search on metacpan
lib/App/ImageMagickUtils.pm view on Meta::CPAN
next FILE;
}
}
my $q = $args{quality} // 40;
my @convert_args = (
$file,
);
my $downsized;
#say "D:downsize_to=<$downsize_to>, width=<$width>, height=<$height>, q=<$q>";
DOWNSIZE: {
last unless $downsize_to;
my $ratio;
my $shortest_side = $width > $height ? $height : $width;
last unless $shortest_side > $downsize_to;
$downsized++;
push @convert_args, "-resize", "$downsize_to^>";
} # DOWNSIZE
push @convert_args, "-quality", $q;
( run in 0.580 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )