]> git.sesse.net Git - pr0n/blobdiff - perl/Sesse/pr0n/Common.pm
Treat CR2 the same as NEF.
[pr0n] / perl / Sesse / pr0n / Common.pm
index 73980c0b05738eb2cf97cc5781dd80d8b1737afe..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";
                
@@ -732,7 +732,7 @@ sub make_infobox {
                my ($a, $b) = ($1, $2);
                my $gcd = gcd($a, $b);
                push @classic_fields, [ $a/$gcd . "/" . $b/$gcd . "s", $shutter_priority ];
                my ($a, $b) = ($1, $2);
                my $gcd = gcd($a, $b);
                push @classic_fields, [ $a/$gcd . "/" . $b/$gcd . "s", $shutter_priority ];
-       } elsif (defined($info->{'ExposureTime'}) && $info->{'ExposureTime'} =~ /^(\d+)$/) {
+       } elsif (defined($info->{'ExposureTime'}) && $info->{'ExposureTime'} =~ /^(\d+(?:\.\d+))$/) {
                push @classic_fields, [ $1 . "s", $shutter_priority ];
        }
 
                push @classic_fields, [ $1 . "s", $shutter_priority ];
        }