From 9f88be0c76a71ec511c21a872ae02db66a015176 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Sat, 24 Mar 2007 15:24:06 +0000 Subject: [PATCH] I *think* this fixes #18. git-svn-id: http://svn.simon-cozens.org/memories/trunk@48 041978f6-d955-411f-a9d7-1d8545c9c3c7 --- Memories/Photo.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Memories/Photo.pm b/Memories/Photo.pm index 3af95ce..6e09ae9 100644 --- a/Memories/Photo.pm +++ b/Memories/Photo.pm @@ -306,7 +306,7 @@ my %banned_tags = map { $_ => 1 } sub _exif_info { my $exifTool = new Image::ExifTool; $exifTool->Options(Group0 => ['IPTC', 'EXIF', 'XMP', 'MakerNotes', 'Composite']); - my $info = $exifTool->ImageInfo(shift->path); + my $info = $exifTool->ImageInfo(shift->path(0,0,1)); my $hash = {}; foreach my $tag ($exifTool->GetFoundTags('Group0')) { next if $banned_tags{$tag}; @@ -344,14 +344,14 @@ sub sized_url { # Use this rather than ->path from TT } sub path { - my ($self, $is_url, $scale) = @_; + my ($self, $is_url, $scale, $raw) = @_; my $path = Memories->config->{$is_url eq "url" ? "data_store_external" : "data_store" }; if ($scale) { $path .= "$scale/" } # Make dir if it doesn't exist, save trouble later use File::Path; if ($is_url ne "url" and ! -d $path) {mkpath($path) or die "Couldn't make path $path: $!";} - if ($scale or $is_url ne "url") { + if ($scale or ($is_url ne "url" and !$raw)) { $path .= $self->id.".jpg"; } else { $path .= $self->id.".".($self->format||"jpg"); -- 2.39.5