Repository navigation
Decode Nikon Expeed 6 and 7 AFInfo2 geometry - #9547
Open
righthandabacus wants to merge 1 commit into
Open
righthandabacus wants to merge 1 commit into
righthandabacus wants to merge 1 commit into
Conversation
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
Add AFInfo2 layouts 0300/0301 and 0400/0401/0402, exposing AF area coordinates, dimensions, and status fields. Preserve uninterpreted bytes during metadata writes. Validate all geometry fields against ExifTool, cover both TIFF byte orders and malformed versions, and update the two Nikon Z6 regression references. All 329 fixture regressions and 8 targeted tests pass.
righthandabacus
force-pushed
the
feature/nikon-afinfo2
branch
from
November 23, 2026 01:24
83f15f7 to
7dfa267
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Decode Nikon AFInfo2 versions
0300/0301and0400/0401/0402using the field layouts documented in ExifTool's Nikon.pm.Expose AF area X/Y, image width/height, area width/height, detection method, area mode, coordinate availability, and the layout-specific focus fields. Use the embedded MakerNote TIFF byte order and preserve uninterpreted bytes through the existing binary-array reader/writer.
Coordinates are meaningful when
AFCoordinatesAvailableis 1. Stored numeric fields remain visible when it is 0, unlike ExifTool's conditional omission. Camera-dependent AF-point bitmap names and derived grid labels are outside this change.Evidence
test/data/NikonZ6.exvexposes AFInfo2 as a 60-byte undefined value.After:
NikonAf23reports image dimensions 6048 × 4024, AF center (4590, 2580), and area dimensions 285 × 308, matching ExifTool.cd tests python3 runner.py bugfixes/github/test_nikon_afinfo2.py python3 runner.py bugfixes/github/test_issue_646.py python3 runner.py regression_tests/test_regression_allfiles.py0101layout.04xxcoverage uses generated metadata.Merge Danger
Door: Two-way; the decoder additions can be reverted.
Blast Radius: Nikon metadata.
The five newly recognized versions expose structured tags in place of the opaque AFInfo2 value. Older layouts retain their existing keys, unknown versions remain opaque, and new group IDs are appended to preserve existing enum values.