From 78a8081f2cbd91b8bc206b4a0f2b42322230aede Mon Sep 17 00:00:00 2001 From: Benjamin Grimm-Lebsanft Date: Wed, 24 Jun 2026 10:42:07 +0200 Subject: [PATCH] Support Canon Highlight Tone Priority compensation --- src/common/exif.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/common/exif.cc b/src/common/exif.cc index 6fd7b862ebcb..12a7873b65f6 100644 --- a/src/common/exif.cc +++ b/src/common/exif.cc @@ -1172,6 +1172,13 @@ static void _check_highlight_preservation(Exiv2::ExifData &exifData, else if(state == 2) img->exif_highlight_preservation = 0.66f; // estimated strength for Strong } + // Canon Highlight Tone Priority. D+ (1) and D+2 (2) both apply ~1 EV sensor underexposure. + if(FIND_EXIF_TAG("Exif.CanonLiOp.HighlightTonePriority")) + { + const long state = pos->toLong(0); + if(state > 0) + img->exif_highlight_preservation += 1.0f; + } else if(FIND_EXIF_TAG("Exif.Fujifilm.DevelopmentDynamicRange") // manual mode DR100/DR200/DR400 || FIND_EXIF_TAG("Exif.Fujifilm.AutoDynamicRange")) // auto mode {