my $imgpath = "$IMGROOT/$path";
my $st = stat $imgpath or die "no image `$path'";
return bless {
- path => $path,
+ path => $path, imgpath => $imgpath,
mtime => $st->mtime,
img => undef
}, $cls;
my $img = $me->{img};
unless (defined $img) {
- my $imgpath = "$IMGROOT/$path";
my $exif = new Image::ExifTool;
- $exif->ExtractInfo($imgpath);
+ $exif->ExtractInfo($me->{imgpath});
my $orient = $exif->GetValue("Orientation", "ValueConv");
- $img = $me->{img} = Image::Imlib2->load($imgpath);
+ $img = $me->{img} = Image::Imlib2->load($me->{imgpath});
if (defined $orient) {
my ($rot, $flip) = @{$ORIENT{$orient}};
if ($rot) { $img->image_orientate($rot); }