Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.89k stars 323 forks source link

Dark frame subtraction produces dark green image after conversion of CR3->dng #5831

Open snoukkis opened 4 years ago

snoukkis commented 4 years ago

I'm using a Canon EOS M6 Mark II which produces CR3 format raw images. Because of the missing metadata support in RawTherapee for CR3, I'm first converting to dng.

Dark frame subtraction works correctly if I load the original CR3 image and subtract either CR3 or dng dark frame. See this.

However if I load the converted dng image and subtract either CR3 or dng dark frame, the resulting image is dark and green. See this.

Version details:

Version: 5.8
Branch: 5.8
Commit: 9a9e0acbf
Commit date: 2020-02-04
Compiler: clang 11.0.0.11000033
Processor: generic x86
System: Apple
Bit depth: 64 bits
Gtkmm: V3.24.2
Lensfun: V0.3.95.0
Build type: release
Build flags: -Wno-deprecated-register -Wno-unused-command-line-argument -std=c++11 -std=c++11 -mtune=generic -Werror=unused-label -Werror=delete-incomplete -mmacosx-version-min=10.9 -flto -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -Xpreprocessor -fopenmp /opt/local/lib/libomp.dylib -I/opt/local/include -Werror=unknown-pragmas -O3 -DNDEBUG -ftree-vectorize
Link flags:  -mtune=generic -headerpad_max_install_names -flto
OpenMP support: ON
MMAP support: ON

Operating system: macOS Mojave 10.14.6 (18G4032)

Steps to reproduce the problem:

  1. Acquire a pair of image + dark frame CR3 files from Canon EOS M6 Mark II or use the provided files.
  2. Convert them to dng with Adobe DNG Converter with settings:
    • Compatibility: Camera Raw 11.2 and later
    • no lossy compression ... or use the provided preconverted dng files.
  3. Load the converted image dng with "Neutral" processing profile. (or use the converted_image.dng.pp3)
  4. Apply the converted dng (or original CR3, makes no difference) dark frame.
  5. Resulting image preview looks dark and green. Thumbnail not affected.

All files downloadable from https://mega.nz/folder/MWBjHIYS#LAES3fmE1DcueXEX9tZ4dw

heckflosse commented 4 years ago

Looks fine here in 5.8 dev build grafik

snoukkis commented 4 years ago

Looks fine here in 5.8 dev build

I tried to confirm that by building the macOS version (with Homebrew deps, without codesign/notarize) (since there seems to be no macOS nightly), but something went wrong:

clang: warning: /usr/local/lib/libomp.dylib: 'linker' input unused [-Wunused-command-line-argument]
clang: error: invalid version number in '-mmacosx-version-min='
clang: warning: /usr/local/lib/libomp.dylib: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: /usr/local/lib/libomp.dylib: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: /usr/local/lib/libomp.dylib: 'linker' input unused [-Wunused-command-line-argument]
clang: error: invalid version number in '-mmacosx-version-min='
clang: warning: /usr/local/lib/libomp.dylib: 'linker' input unused [-Wunused-command-line-argument]
clang: error: invalid version number in '-mmacosx-version-min='
clang: warning: /usr/local/lib/libomp.dylib: 'linker' input unused [-Wunused-command-line-argument]
clangclang: : error: warninginvalid version number in '-mmacosx-version-min=':
/usr/local/lib/libomp.dylib: 'linker' input unused [-Wunused-command-line-argument]
clang: error: invalid version number in '-mmacosx-version-min='
clang: error: invalid version number in '-mmacosx-version-min='
clang: error: invalid version number in '-mmacosx-version-min='
make[2]: *** [rtexif/CMakeFiles/rtexif.dir/nikonattribs.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [rtexif/CMakeFiles/rtexif.dir/kodakattribs.cc.o] Error 1clangclangclang
: : : warning: warning/usr/local/lib/libomp.dylib: 'linker' input unused [-Wunused-command-line-argument]
warning: /usr/local/lib/libomp.dylib: 'linker' input unused [-Wunused-command-line-argument]make[2]:
*** [rtexif/CMakeFiles/rtexif.dir/canonattribs.cc.o] Error 1
make[2]: *** [rtexif/CMakeFiles/rtexif.dir/panasonicattribs.cc.o] Error 1:
/usr/local/lib/libomp.dylib: 'linker' input unused [-Wunused-command-line-argument]
make[2]: *** [rtexif/CMakeFiles/rtexif.dir/pentaxattribs.cc.o] Error 1
make[2]: *** [rtexif/CMakeFiles/rtexif.dir/olympusattribs.cc.o] Error 1
make[2]: *** [rtexif/CMakeFiles/rtexif.dir/fujiattribs.cc.o] Error 1
clang: error: invalid version number in '-mmacosx-version-min='
clang: error: invalid version number in '-mmacosx-version-min='
clang: error: invalid version number in '-mmacosx-version-min='
make[2]: *** [rtexif/CMakeFiles/rtexif.dir/sonyminoltaattribs.cc.o] Error 1
make[2]: *** [rtexif/CMakeFiles/rtexif.dir/stdattribs.cc.o] Error 1
make[2]: *** [rtexif/CMakeFiles/rtexif.dir/rtexif.cc.o] Error 1
make[1]: *** [rtexif/CMakeFiles/rtexif.dir/all] Error 2
make: *** [all] Error 2

Any tips getting it to compile in macOS? While I'm literate, clang/C++ is not my bread and butter. My Windows game oriented machine is not really suited for photo work so I wouldn't mind running dev version til 5.9 gets out.

Bah, anyway, for testing I gave up and started the Windows machine: