X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FCommon.pm;h=8a426987bf2fbb90614f7f36620aaf37cbbcaae2;hb=30e800d975f1d75656094b37303dcc62facda9a5;hp=816c003cb016eac4d55b11d3dde730ceb89b19bf;hpb=8659566dfd0c4a181b4562bc171a8f7df933668f;p=pr0n diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index 816c003..8a42698 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -528,17 +528,9 @@ sub read_original_image { } my $err; - # 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|cr2)$/i) { - # this would suffice if ImageMagick gets to fix their handling - # $physical_fname = "NEF:$physical_fname"; - - open DCRAW, "-|", "dcraw", "-w", "-c", $physical_fname - or error("dcraw: $!"); - $err = $magick->Read(file => \*DCRAW); - close(DCRAW); + $physical_fname = "NEF:$physical_fname"; + $err = $magick->Read($physical_fname); } else { # We always want YCbCr JPEGs. Setting this explicitly here instead of using # RGB is slightly faster (no colorspace conversion needed) and works equally