From: Mark Wooding Date: Fri, 9 Jun 2023 21:10:55 +0000 (+0100) Subject: mason/dhandler: Build the image a little earlier. X-Git-Url: https://git.distorted.org.uk/~mdw/tgal/commitdiff_plain/551a3ba41e0d76cdf1097096aacdbb4c41732e8e mason/dhandler: Build the image a little earlier. Just in case we have another use for it in mind. Maybe. --- diff --git a/mason/dhandler b/mason/dhandler index ca5dad2..aca88bb 100755 --- a/mason/dhandler +++ b/mason/dhandler @@ -145,11 +145,12 @@ Failed to find ‘<% $path |h %>’. <%perl> my ($dir, $base, $ext) = split_path $path; my $real = join_paths $IMGROOT, $path; + my $img = TrivGal::Image->new($path); my $url = join_paths $IMGURL, $path; my $realdir = join_paths $IMGROOT, $dir; my $urldir = join_paths $SCRIPTURL, $dir; my ($dd, $ff, $ii) = listdir $realdir; - my $vw = TrivGal::Image->new($path)->scale("view"); + my $vw = $img->scale("view"); my $fi = undef; FILE: for (my $i = 0; $i < @$ff; $i++)