]> git.decadent.org.uk Git - memories.git/commitdiff
Switch to using Image::Size because the EXIF parsing code in Image::Info was broken...
authorSimon Cozens <simon@simon-cozens.org>
Mon, 2 Apr 2007 18:48:56 +0000 (18:48 +0000)
committerSimon Cozens <simon@simon-cozens.org>
Mon, 2 Apr 2007 18:48:56 +0000 (18:48 +0000)
git-svn-id: http://svn.simon-cozens.org/memories/trunk@53 041978f6-d955-411f-a9d7-1d8545c9c3c7

Memories/Photo.pm
README

index 691a71415fe3dc210aad283cacc68ee733de6d0d..a92280782c721af1d6e04987d5861d9981d9d7dd 100644 (file)
@@ -7,6 +7,7 @@ use File::Temp qw(tempdir tmpnam);
 use File::Path qw(rmtree);
 use File::Find;
 use File::MMagic;
+use Image::Size qw(imgsize);
 use strict;
 use Carp qw(cluck confess);
 use base qw(Memories::DBI Maypole::Model::CDBI::Plain);
@@ -148,7 +149,7 @@ sub upload_jpeg {
        warn "Couldn't copy photo to ".$photo->path("file").": $!";
         $photo->delete(); die;
     }
-    my ($x, $y) = dim(image_info($photo->path));
+    my ($x, $y, undef) = imgsize($photo->path);
     $photo->x($x); $photo->y($y);
 
     # Rotate?
@@ -239,7 +240,6 @@ sub add_comment :Exported {
 }
 
 use Cache::MemoryCache;
-use Image::Info qw(dim image_info);
 use Image::ExifTool;
 my $cache = new Cache::MemoryCache( { 'namespace' => 'MemoriesInfo' });
 
@@ -452,7 +452,7 @@ sub tags_exif {
         map { split /\s*,\s*/, $md{$_}}
         grep {$md{$_} and $md{$_} =~/[^ 0:]/}
         (qw(Keywords Subject City State Location Country Province-State), 
-        'Transmission Reference', 'Intellectual Genre', 
+        'Intellectual Genre', 
         'Country-Primary Location Name'
         );
     return keys %tags;
diff --git a/README b/README
index b241a5836a6fadf7a6e1cde2d54e6ad000e506be..d2acb4188e817df5f6d56165071811b5592694d4 100644 (file)
--- a/README
+++ b/README
@@ -9,7 +9,7 @@ First, Perl modules. This is the hard part. You will need:
     DBI
     DBD::mysql
     Class::DBI::mysql
-    Image::Info
+    Image::Size
     Image::Imlib2 (requires libimlib2 and libimlib2-dev packages)
     Time::Piece
     Cache::Cache