Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/common/exif.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,17 @@ static void _check_highlight_preservation(Exiv2::ExifData &exifData,
img->exif_highlight_preservation = 0.0f;

Exiv2::ExifData::const_iterator pos;

// Canon Highlight Tone Priority: checked independently of ALO since both tags
// can be set simultaneously on modern Canon bodies.
// D+ (1) and D+2 (2) both apply ~1 EV sensor underexposure; D+2 is scene dependent
// according to Canon but start with 1 EV here as well.
if(FIND_EXIF_TAG("Exif.CanonLiOp.HighlightTonePriority"))
{
const long state = pos->toLong(0);
if(state > 0)
img->exif_highlight_preservation = 1.0f; // D+ or D+2: ~1 EV underexposure
}
if(FIND_EXIF_TAG("Exif.Canon.LightingOpt")) // Active Lighting Optimization
{
// tag consists of an array of long values
Expand Down
Loading