require Sesse::pr0n::Config_local;
};
- $VERSION = "v2.51";
+ $VERSION = "v2.53";
@ISA = qw(Exporter);
@EXPORT = qw(&error &dberror);
%EXPORT_TAGS = qw();
my ($r, $filename, $id, $dbwidth, $dbheight, $infobox, $xres, $yres, @otherres) = @_;
my $fname = get_disk_location($r, $id);
- unless (defined($xres) && ($xres < $dbheight || $yres < $dbwidth || !defined($dbwidth) || !defined($dbheight) || $xres == -1)) {
+ unless (defined($xres) && (!defined($dbwidth) || !defined($dbheight) || $xres < $dbheight || $yres < $dbwidth || $xres == -1)) {
return ($fname, 0);
}
# 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$/) {
+ if ($filename =~ /\.nef$/i) {
# this would suffice if ImageMagick gets to fix their handling
# $fname = "NEF:$fname";
# Apache2::ServerUtil->server->log_error(join(':', keys %$info));
+ my $iso = undef;
if (defined($info->{'NikonD1-ISOSetting'})) {
- push @classic_fields, [ $info->{'NikonD1-ISOSetting'}->[1] . " ISO", 0 ];
+ $iso = $info->{'NikonD1-ISOSetting'};
+ } elsif (defined($info->{'ISO'})) {
+ $iso = $info->{'ISO'};
} elsif (defined($info->{'ISOSetting'})) {
- push @classic_fields, [ $info->{'ISOSetting'} . " ISO" ];
+ $iso = $info->{'ISOSetting'};
+ }
+ if (defined($iso) && $iso =~ /(\d+)/) {
+ push @classic_fields, [ $1 . " ISO", 0 ];
}
if (defined($info->{'ExposureBiasValue'}) && $info->{'ExposureBiasValue'} ne "0") {