git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
word/edit: ignore missing binomial name in wp download
[sheet.git]
/
Shiar_Sheet
/
ImagePrep.pm
diff --git
a/Shiar_Sheet/ImagePrep.pm
b/Shiar_Sheet/ImagePrep.pm
index 6457a83a0c08071fbbf7daa185db8403ee600f57..f76cb31d7f4f3a448d91c6799c9fc8277a18a19a 100644
(file)
--- a/
Shiar_Sheet/ImagePrep.pm
+++ b/
Shiar_Sheet/ImagePrep.pm
@@
-3,7
+3,7
@@
package Shiar_Sheet::ImagePrep;
use 5.014;
use warnings;
use 5.014;
use warnings;
-our $VERSION = '1.0
0
';
+our $VERSION = '1.0
1
';
sub new {
my ($class, $target) = @_;
sub new {
my ($class, $target) = @_;
@@
-34,13
+34,13
@@
sub dimensions {
}
sub convert {
}
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;
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) {
my $aspect = 3/2;
my @cmds = @{ $cmds // [] };
if (my ($cmdarg) = grep { $cmds[$_] eq '-area' } 0 .. $#cmds) {