X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/11ddce3271ecafca9e966b462aafe308fd134f29..50442220cc52bad55c1003de34f8dada958650d5:/Shiar_Sheet/ImagePrep.pm diff --git a/Shiar_Sheet/ImagePrep.pm b/Shiar_Sheet/ImagePrep.pm index 6457a83..f76cb31 100644 --- a/Shiar_Sheet/ImagePrep.pm +++ b/Shiar_Sheet/ImagePrep.pm @@ -3,7 +3,7 @@ package Shiar_Sheet::ImagePrep; use 5.014; use warnings; -our $VERSION = '1.00'; +our $VERSION = '1.01'; sub new { my ($class, $target) = @_; @@ -34,13 +34,13 @@ sub dimensions { } sub convert { - my ($imgpath, $thumbpath, $cmds) = @_; + my ($imgpath, $thumbpath, $cmds, $xyres) = @_; if (not -e $$imgpath) { return !-e $thumbpath || unlink $thumbpath; } #my ($w, $h) = $imgpath->dimensions; - my $xyres = 0 ? '600x400' : '300x200'; # cover + $xyres //= '300x200'; # cover my $aspect = 3/2; my @cmds = @{ $cmds // [] }; if (my ($cmdarg) = grep { $cmds[$_] eq '-area' } 0 .. $#cmds) {