~mdw
/
tgal
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mason/.perl-lib/TrivGal.pm (Image::scale): Check size much earlier.
[tgal]
/
mason
/
.perl-lib
/
TrivGal.pm
diff --git
a/mason/.perl-lib/TrivGal.pm
b/mason/.perl-lib/TrivGal.pm
index
d6d3afb
..
513a682
100644
(file)
--- a/
mason/.perl-lib/TrivGal.pm
+++ b/
mason/.perl-lib/TrivGal.pm
@@
-240,6
+240,9
@@
package TrivGal::Image {
my $path = $me->{path};
my $sz = $SIZE{$scale} or die "unknown scale `$scale'";
my $path = $me->{path};
my $sz = $SIZE{$scale} or die "unknown scale `$scale'";
+ if ($me->sz <= $sz)
+ { return $m->interp->apply_escapes("$IMGURL/$path", "u"); }
+
my $thumb = "$CACHE/scale.$sz/$path";
my $thumburl =
$m->interp->apply_escapes("$CACHEURL/scale.$sz/$path", "u");
my $thumb = "$CACHE/scale.$sz/$path";
my $thumburl =
$m->interp->apply_escapes("$CACHEURL/scale.$sz/$path", "u");
@@
-265,8
+268,6
@@
package TrivGal::Image {
}
}
}
}
- if ($me->sz <= $sz)
- { return $m->interp->apply_escapes("$IMGURL/$path", "u"); }
my $sc = $sz/$me->sz;
my $scaled = $img->create_scaled_image($sc*$wd, $sc*$ht);
my $sc = $sz/$me->sz;
my $scaled = $img->create_scaled_image($sc*$wd, $sc*$ht);