Canon .CR3 files and white balance difference in CR3 vs DNG

I started learning Rawtherapee a month ago.
With great help From Andy Astburry and his Patreon channel.

I run the latest dev version on Macos.
I love working with Rt because of it´s excellent raw editing.

I own a Canon R5 and i shoot raw so my files are .CR3 files.
I can open them in Rt, but the exif data is not read (yet).
On the camera I use Auto White balance.

I noticed a big difference in the white balance setting (methods camera and automatic)
when opening a .CR3 file vs a .DNG file created from that .CR3 file.
Of course the exif data can be read from the DNG.

The DNG white balance settings are similar to those in Lightroom and look ok.
the CR3 white balance settings are way to warm.

The temperature in the CR3 is between 800 and 1200 higher than the DNG.
Also there is a difference in the tint.

I suppose this is caused by the lack of exif data in the CR3 file.

But to me it does not explain why the difference is also there when using
the automatic method instead of the camera method.

What would be the best way to use CR3 files ( which i prefer ) but still get
a correct white balance when opening it in Rt ?

You might want to check this out and see if the metadata helps…

I tried to compile and make a version for my Mac Mini M1 as follows

brew install gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun wget llvm cmake expat pkgconfig shared-mime-info

curl -L -o libomp.rb && brew install libomp.rb

mkdir -p ~/programs
git clone GitHub - KarlMagnusLarsson/RawTherapee: A powerful cross-platform raw photo processing program ~/programs/code-rawtherapee
cd ~/programs/code-rawtherapee
git checkout dev

cd ~/programs/code-rawtherapee
rm -rf build
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=“release”
-DPROC_LABEL=“generic processor”
-DCODESIGNID=“Developer ID Application: Hans Nieuwenhuis (xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx x xx xx)”

make -j$(sysctl -n hw.ncpu) install
sudo make macosx_bundle

At the first i did not use the -DCODESIGNID and RT crashed with a code signing error.
I created a Self-signed root certificate for codesigning, but i am not sure what the syntax of the -DCODESIGNID is
I inserted the Key ID from the certificate.
But Rt still crashes at startup.
See attached crashdump file.

CrashDump.txt (19.6 KB)

Ok , i thought i had the code signing fixed ( but i did not ) , now i get another signing error when Rt crashes at startup.
I used the following command for the signing

cd /Applications
sudo codesign --force --deep --timestamp --strict -v -s “Hans Nieuwenhuis” -i com.rawtherapee.RawTherapee -o runtime --entitlements /Users/hn/programs/code-rawtherapee/tools/osx/rt.entitlements

See attached file.
CrashDump2.txt (10.7 KB)

I can start Rt from the build directory without problems.
No idea why it will not start from /Applications

Version = 5.8-3098-g404a584c7

BUT if i open a Canon R5 ( CR3 ) image there is no exif data.

I checked and the strange difference in Whitebalance for CR3 and DNG no longer exists in this build!!

Very happy with that.

So after all it was not related to the missing exif data because that is still missing.

This build crashes regularly after sending image to photoshop.

After opening image, send to photoshop, close in photoshop, close in Rt, open other image in Rt, send to photoshop, close photoshop, etc…

Rt crashes on the second or third image. No crashdump file.

In the terminal where i start Rt i see
zsh: bus error /Users/hn/programs/code-rawtherapee/build/release/MacOS/rawtherapee

I get the same errors when using
git clone

I will create a separate issue for the issues after building Rawtherapee from that clone.

@jhmnieuwenhuis, Thank you for the test of CR3 metadata. I think you are on the wrong branch in my fork.

The fork GitHub - KarlMagnusLarsson/RawTherapee: A powerful cross-platform raw photo processing program does contain a patch and a merge of current dev code and old metadata-exiv2 branch, but in branch metadata-exiv2-update. To get that you need to execute. for instance:

git clone
cd RawTherapee
git checkout --track  origin/metadata-exiv2-update

Your version below is 5.8-3098-g404a584c7, which is current dev. The dev branch in my clone is the same as dev branch in RT main repo

I posted documentation here: CR3 metadata decoding test of feature branch on Linux - #7 by KarlMagnusLarsson

That is correct. I think you have dev branch. Get metadata-exiv2-update branch to test CR3 metadata.

The main repo dev and my fork dev are the same.

I find the dev code stable in Linux, but that does not help OSX. I have OSX 10.13.6 (2010) Imac and I used to build from source, but I no longer do that for OSX and I do not think my old Imac is relevant anymore, even if I did.

What I did in metadata-exiv2-update contains all of current dev, that you have already tested. I fear that any issue you have found in dev exist also in metadata-exiv2-update.

Also note that, as stated in CR3 metadata decoding test of feature branch on Linux - #7 by KarlMagnusLarsson, that The metadata-exiv2-update branch requires exiv2 upgraded to v0.27.5 with -DEXIV2_ENABLE_BMFF=On, in order to display CR3 exif metadata. I compiled exiv2 v0.27.5 -DEXIV2_ENABLE_BMFF=On myself and used a local lib. The status of any brew libraries in this regard is not known to me. That depends on the brew package maintainer. (On Linux Debian this might be fixed in Debian testing version)

Again, thank you for testing and good luck.

Thanks Magnus.

I will try that tomorrow morning.


I build a new version this morning using the origin/metadata-exiv2-update branch.
I see the exif data now, great !!

If i try to start Rawtherapee from the Applications directory it does not start.
No error, no crashdump

If i start it from /Users/hn/programs/code-rawtherapee/build/release/MacOs it runs

I will do some more testing…

In Rt editor I set the Color > Output Profile to ProPhoto.

If i use the metadata-exiv2-update build and try to open an image in Photoshop i get a popup about an embedded profile mismatch.

Screenshot 2022-06-16 at 09.06.30

If i use the dev branch i do not get this popup and it opens using the ProPhoto output profile.

I got a crashdump when trying to open image in photoshop.

CrashonOpenInPhotoshop.txt (139.9 KB)

The crash also happens when adding the image to the queue and start the queue.

Hello @jhmnieuwenhuis. I see something similar on my side, on Linux Debian.

If I build regular RT dev branch then the selected output color profile in RT editor is respected when I push out, to GIMP, in my case and GIMP opens and displays the file with my chosen color profile .

When I use my experimental fork and branch metadata-exiv2-update this is not the case. GIMP starts and the picture is displayed in GIMP, but with GIMP default internal sRGB profile.
This is not correct. The output color profile selected in RT should be respected when pushing out to external application.

I see the same thing (chosen RT output color profile not respected) even in branch metadata-exiv2, from RT main repo, before me merging in dev in my own fork and metadata-exiv2-update branch. => I think, but I do not know, that this is not due to the many merge conflict resolutions I had to make. The root cause is in the old code in metadata-exiv2, from RT main repo.

However I need to do more testing and check the settings of my GIMP application.

OK, thanks.