Canon R6markII & RT5.9 is inconsistent

Thanks for the hint @Bernhard. I submitted a request to add the R8 (Camconst entry for Canon EOS R8 by Lawrence37 · Pull Request #6768 · Beep6581/RawTherapee · GitHub).

R8 user here, I tried to copy the merge requested camconst.json code to my system copy to make the R8 work, but on running RT I got this in the terminal:

“raw_crop” array must contain numbers
failed to parse camera constants file “C:\Program Files\RawTherapee\5.9.\camconst.json”

(rawtherapee.exe:21700): Gtk-WARNING **: 01:40:50.237: Failed to parse C:\Program Files\RawTherapee\5.9\share\gtk-3.0\settings.ini: Key file does not start with a group

So I think I did added it wrong… Is there a way I can add the code myself, or do I Just need to wait for the next RT release?

You can download the whole file here:

https://raw.githubusercontent.com/Beep6581/RawTherapee/376d680b16da38436d70e206d19593446f43a111/rtengine/camconst.json

HTH,
Flössie

Hi @JustFlxn, and welcome!

It’s a l-o-n-g time since I used Windows,
but from where did you get the data to
merge into camconst.json?

Perhaps, just perhaps, you fell into the old
trap of using wrong end-of-line markers; they
are normally invisible, thus a trifle difficult
to detect :-)))

More info: newline - Difference between CR LF, LF and CR line break types - Stack Overflow

Have fun!
Claes in Lund, Sweden

@Claes I appreciate the welcome, and @floessie thanks for the file. I followed the links that Lawrence37 put:

and tried to add the suggested changes into the current code copying and pasting. That didn’t work. Then I simply overwrote my camconst.json with the file that Lawrence37 posted, and that is still giving me this error:

“raw_crop” array must contain numbers
failed to parse camera constants file “C:\Program Files\RawTherapee\5.9.\camconst.json”

(rawtherapee.exe:27144): Gtk-WARNING **: 00:27:22.840: Failed to parse C:\Program Files\RawTherapee\5.9\share\gtk-3.0\settings.ini: Key file does not start with a group

I did note that the path has " 5.9.\camconst.json " in it, which is weird because there’s no ‘.’ folder so I’m not sure what’s going on in the path… RT loads up as it did before adjusting the file at all, which is kinda neat that it doesn’t crash, but the extra black space on the side remains.

-And I didn’t know about the difference in line markers, but I wouldn’t imagine it would matter if I copied and pasted text without adding any characters? I opened the file with Cudatext and this is what it showed:

cudatext_mVvdLWQK6r

I think the arrow is what kind of newline it is, I don’t know what down arrow is but there’s a left facing arrow at the very end of the document, I have a suspicion that’s not the problem…

Thank you for the help by the way.

@JustFlxn I see you’re using 5.9. The camconst you copied contains multiple raw crops per camera which is a feature that has yet to be released. After you copy the entry into your own camconst.json, edit the raw crop into the single crop format. It should look something like this:

"raw_crop": [154, 96, 6024, 4024],

Same for masked areas:

"masked_areas": [4, 4, 4116, 150, 4, 150, 92, 6184]

Thank you @Lawrence37 , it works!

For any passerby, just copying this section into the camconst.json file after the R6 entry did the trick:

{ // Quality C
“make_model”: [“Canon EOS R8”],
“dcraw_matrix”: [9539, -2795, -1224, -4175, 11998, 2458, -465, 1755, 6048],
“raw_crop”: [154, 96, 6024, 4024],
“masked_areas”: [4, 4, 4116, 150, 4, 150, 92, 6184]
},

Thanks guys, I really appreciate it :smiley: