+ sub _getsz ($) {
+ my ($me) = @_;
+ return if defined $me->{_wd};
+
+ my ($wd, $ht, $err) = Image::Size::imgsize $me->{imgpath};
+ defined $wd or die "failed to read size of `$me->{path}': $err";
+ my $sz = $wd; if ($sz < $ht) { $sz = $ht; }
+ @$me{"_wd", "_ht", "sz"} = ($wd, $ht, $sz);
+ }
+
+ sub sz ($) { my ($me) = @_; $me->_getsz; return $me->{sz}; }
+