use warnings;
use experimental 'signatures';
-our $VERSION = '1.02';
+our $VERSION = '1.03';
sub new ($class, $target) {
bless \$target, $class;
);
}
-sub convert ($imgpath, $thumbpath, $cmds, $xyres) {
+sub convert ($imgpath, $thumbpath, $cmds, $xyres = 0) {
#my ($w, $h) = $imgpath->dimensions;
#my $aspect = 3/2; # $xyres
my @cmds = @{$cmds};
'-strip', -quality => '60%', -interlace => 'plane',
-gravity => defined $cmds ? 'northwest' : 'center',
@cmds,
- -resize => "$xyres^", -extent => $xyres,
+ $xyres ? (-resize => "$xyres^", -extent => $xyres) : (),
$thumbpath
);