Feature #894

Canon Highlight Tone Priority

Added by Pascal de Bruijn over 8 years ago. Updated about 5 years ago.

Target version:
Start date:
17 Mar 2013
Due date:
% Done:


Estimated time:
10.00 h



Recent Canon camera's have a feature called Highlight Tone Priority (HTP), which is described as such:

"Highlight tone priority shoots at an ISO speed one stop lower (1ev underexposure) then compensates for this in RAW processing."

Currently it seems Exiv2 can't tell us if a file was shot with HTP On or Off.

On a side note ExifTool apparently can read the HTP status:

$ exiftool HTP.CR2 | grep -i highlight
Highlight Tone Priority : Enable

Pascal de Bruijn


894-5.diff (8.04 KB) 894-5.diff Ben Touchette, 15 Sep 2016 14:11

Related issues

Related to Exiv2 - Feature #1219: Adding Camera TemperatureAssigned31 Aug 2016

Related to Exiv2 - Bug #1203: Exif.CanonCs.FocusContinuous reported as ShortAssigned11 Aug 2016




Updated by Robin Mills over 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Niels Kristian Bech Jensen
  • Priority changed from Low to Normal
  • Target version set to 0.24


May I ask you to take a look at this. Pascal works on DarkTable - a really awesome open-source project. I feel guilty that I haven't picked this up already. I'm a little overwhelmed at the moment (especially with Google Summer of Code). If you can't deal with this, please assign this back to me.



Updated by Niels Kristian Bech Jensen over 8 years ago

Hi Robin.

I have students up for final exams during the next month, so time is limited. I will look into this when exam season is over.

Best regards,
Niels Kristian Bech Jensen


Updated by Pascal de Bruijn over 8 years ago

No need for any guilt :)

Being able to detect HTP isn't critical, but it would be nice too have, as it would allow us to automatically compensate for the cases where people either purposefully or accidentally enabled HTP.


Updated by Robin Mills over 8 years ago

  • Target version changed from 0.24 to 0.25

Deferred for 0.25.


Updated by Alan Pater over 6 years ago

Is there another sample file that can demonstrate this issue? Not even exiftool shows this field for the linked HTP.CR2 file.


Updated by Pascal de Bruijn over 6 years ago

I think I accidentally deleted that file over time, I'll need to dig up a new sample soon. Stay tuned.


Updated by Alan Pater over 6 years ago

  • Target version changed from 0.25 to 0.26

Updated by Niels Kristian Bech Jensen over 6 years ago

  • Assignee deleted (Niels Kristian Bech Jensen)

Updated by Robin Mills over 5 years ago

  • Assignee set to Robin Mills


Can you provide an image and I will investigate. I'm closing on v0.26 at the end of June. Now's the time. tick tick tick ....

Hope you're good.



Updated by Pascal de Bruijn over 5 years ago

So I don't own a Canon camera with HTP, but I asked around and I got permission to supply you with these:

(from a 7D and a 5DmkII, courtesy of andabata)

(from an 80D, courtesy of dabbill)


Updated by Ben Touchette about 5 years ago

Work in progress. Working on differentiating between models with and without highlight tone priority.


Updated by Robin Mills about 5 years ago

  • Assignee changed from Robin Mills to Ben Touchette
  • Target version changed from 0.26 to 0.28
  • % Done changed from 0 to 50
  • Estimated time set to 10.00 h

Thanks for working on this, Ben. I'm going to defer this for v0.27. This issue has elements in common with #1203 and #1219.

Reading and writing those tags isn't simple and I've never worked in the MakerNote decode/encode code. Raphael is working on #1219 and I think he's going to visit me in England in October. We'll discuss all of these issues when he's here. I know that Shridar is very anxious for #1203 to be included in v0.26. It may be possible to include fixes for all three issues in v0.26, however the project is already at feature complete.


Updated by Robin Mills about 5 years ago

I've built and reviewed your code. What you have done looks about right to me. It's reporting lots of metadata that has never seen the light of day before. The following parts of the test suite have been disturbed by this:

651 rmills@rmillsmbp:~/gnu/exiv2/trunk $ make tests | grep differ
Files test/tmp/bugfixes-test.out-stripped and trunk/test/data/bugfixes-test.out differ
Files test/tmp/exifdata-test.out and test/data/exifdata-test.out differ
Files test/tmp/exiv2-test.out and test/data/exiv2-test.out differ
Copy all tests......
Files test/tmp/table.jpg.c3tst and test/data/table.jpg.c3gd differ
Files test/tmp/smiley1.jpg.c3tst and test/data/smiley1.jpg.c3gd differ
Files test/tmp/write-test.out and test/data/write-test.out differ
652 rmills@rmillsmbp:~/gnu/exiv2/trunk $ 
We're going to have to defer this at the moment.

Incidentally, I had to edit the patch to have it respected by SVN. The preferred way to make a patch is to use:

$ cd ~/gnu/exiv2/trunk
$ svn diff . > foo.patch
Thanks for working on this.


Updated by Ben Touchette about 5 years ago

Thanks and welcome, i concur for the deferment due to the number of issues to make this functional at this time.

Also available in: Atom PDF