Decoding ShutterCount for Pentax images
I noticed that the value for Pentax's ShutterCount tag (Exif.PentaxDng.ShutterCount, Exif.Pentax.ShutterCount) is not properly decoded by exiv2 tool.
Attached please find a patch that fixes the issue. As a reference, I used ExifTool source code.
I also did minor clean-up of the code I touched. Besides, fixed 'unused variable' compilation warning emitted from src/easyaccess.cpp
The result exiv2 binary was built and tested on OS X El Capitan (10.11.5) with standard toolchain of Xcode 7.3.1; 'make tests' succeeded as well. The result exiv2 binary reported correct shutter count numbers for DNG, PEF and JPEG files produced by Pentax K20D and K-5 IIs cameras.
Please take a look at the patch.
pentax_shutter_count_tag_decoding.diff - Patch for decoding Pentax ShutterCount tag's value (16.4 KB)
RE: Decoding ShutterCount for Pentax images - Added by Robin Mills 7 months ago
Thanks very much for doing this work, Alexey. I've been intending to cleanup the "unused" variable. You've saved me a chore, and you've done really good work here.
I'm always looking for Engineers to join me in Team Exiv2. If you'd like to participate I'll be happy to discuss this by email:
RE: Decoding ShutterCount for Pentax images - Added by Alexey Serbin 7 months ago
Thank you very much for the instant response and fast adoption of the patch: filing a new issue, updating testsuite, fixing compilation at other platforms.
I'm glad my tiny contribution made its way to the source repository and now people can see correct shutter count numbers for Pentax images reported by exiv2 tool.
The idea of participating in Exiv2 Project is tempting: I'll think about that.