From 603ed7abab9d5296be22dcf90b75313793b19a7d Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Wed, 21 Jun 2023 10:15:19 +0100 Subject: [PATCH] mason/.perl-lib/TrivGal.pm (Image::scale): Sink parsing the path name. This is more logically associated with the output stage. --- mason/.perl-lib/TrivGal.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mason/.perl-lib/TrivGal.pm b/mason/.perl-lib/TrivGal.pm index 96f66f1..e6bfcf4 100644 --- a/mason/.perl-lib/TrivGal.pm +++ b/mason/.perl-lib/TrivGal.pm @@ -257,9 +257,6 @@ package TrivGal::Image { $m->interp->apply_escapes("$SCRIPTURL/$path", "u") . "?scale=$scale"; } else { - my ($dir, undef, $ext) = TrivGal::split_path $thumb; - my $ty = $TYPE{lc $ext} or die "unknown type `$ext'"; - my $img = $me->{img}; unless (defined $img) { my $exif = new Image::ExifTool; @@ -273,6 +270,8 @@ package TrivGal::Image { } } + my ($dir, undef, $ext) = TrivGal::split_path $thumb; + my $ty = $TYPE{lc $ext} or die "unknown type `$ext'"; my $sc = $sz/$me->sz; my $scaled = $img->create_scaled_image($sc*$wd, $sc*$ht); -- 2.11.0