]> git.sesse.net Git - pr0n/commitdiff
Treat CR2 the same as NEF.
authorSteinar H. Gunderson <sesse@debian.org>
Sun, 25 Jan 2009 20:03:24 +0000 (21:03 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Sun, 25 Jan 2009 20:03:24 +0000 (21:03 +0100)
perl/Sesse/pr0n/Common.pm
perl/Sesse/pr0n/Index.pm

index 9f9a72f3c86d0823b0f2623fd8aa90587025e33c..00fa9e9b0c42213676fc70707955ba8a9a696988 100644 (file)
@@ -497,7 +497,7 @@ sub read_original_image {
        # ImageMagick can handle NEF files, but it does it by calling dcraw as a delegate.
        # The delegate support is rather broken and causes very odd stuff to happen when
        # more than one thread does this at the same time. Thus, we simply do it ourselves.
        # ImageMagick can handle NEF files, but it does it by calling dcraw as a delegate.
        # The delegate support is rather broken and causes very odd stuff to happen when
        # more than one thread does this at the same time. Thus, we simply do it ourselves.
-       if ($filename =~ /\.nef$/i) {
+       if ($filename =~ /\.(nef|cr2)$/i) {
                # this would suffice if ImageMagick gets to fix their handling
                # $physical_fname = "NEF:$physical_fname";
                
                # this would suffice if ImageMagick gets to fix their handling
                # $physical_fname = "NEF:$physical_fname";
                
index 3597deeaff849d37d19cacffd3da4d9a4ce9eb08..ee0e31163bf4d510efdd551651cdca5ee34c9683 100644 (file)
@@ -77,7 +77,7 @@ sub handler {
        }
        
        # Any NEF files => default to processing
        }
        
        # Any NEF files => default to processing
-       my $ref = $dbh->selectrow_hashref("SELECT * FROM images WHERE vhost=? $where AND LOWER(filename) LIKE '%.nef' LIMIT 1",
+       my $ref = $dbh->selectrow_hashref("SELECT * FROM images WHERE vhost=? $where AND ( LOWER(filename) LIKE '%.nef' OR LOWER(filename) LIKE '%.cr2' ) LIMIT 1",
                undef, $r->get_server_name)
                and $defsettings{'xres'} = $defsettings{'yres'} = undef;
        
                undef, $r->get_server_name)
                and $defsettings{'xres'} = $defsettings{'yres'} = undef;