Skip to content

Conversation

@rpuneet
Copy link
Contributor

@rpuneet rpuneet commented Feb 7, 2026

Summary

  • Implements Nikon MakerNote parser supporting both Type 1 and Type 3 variants
  • Type 1: 8-byte header, absolute offsets, inherits byte order (older cameras like D1, D100)
  • Type 3: 10-byte header + embedded TIFF, relative offsets, own byte order (modern cameras like D3, D700, Z series)
  • Encrypted tags (LensData 0x0098, FlashInfo 0x00A8) are skipped for now

Test plan

  • Unit tests for Type 1 detection
  • Unit tests for Type 3 detection
  • Unit tests for parsing
  • Unit tests for tag names
  • All existing tests pass

🤖 Generated with Claude Code

@codecov
Copy link

codecov bot commented Feb 7, 2026

Codecov Report

❌ Patch coverage is 35.95506% with 171 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/parser/tiff/makernote/nikon/nikon.go 35.71% 155 Missing and 16 partials ⚠️

📢 Thoughts on this report? Let us know!

@rpuneet
Copy link
Contributor Author

rpuneet commented Feb 7, 2026

Review: Nikon MakerNote Parser (tech-lead-01)

Status: APPROVED

Summary

Comprehensive Nikon implementation with both Type 1 and Type 3 variants.

Positive Findings

  1. Dual variant support:

    • Type 1: 8-byte header, absolute offsets, inherited byte order ✓
    • Type 3: 10-byte header + embedded TIFF, relative offsets, own byte order ✓
    • Detection order correct (Type 3 first) ✓
  2. Implementation:

    • Uses DetectNikonType1/Type3 from makernote.go
    • Proper offset resolution based on variant
    • 113 tag name mappings
  3. Encrypted tag handling:

    • LensData (0x0098) skipped ✓
    • FlashInfo (0x00A8) skipped ✓
  4. Tests:

    • Type 1 and Type 3 detection tests
    • Combined handler tests
    • Parse tests with constructed data
    • Encrypted tag verification
  5. Registration:

    • Nikon registered before Sony (correct order)

LGTM. Merging now.

@rpuneet rpuneet force-pushed the feat/nikon-makernote branch from b02bdad to 87d22db Compare February 7, 2026 19:22
Adds support for Nikon Type 1 and Type 3 MakerNote formats:

Type 1 (older cameras like D1, D100):
- 8-byte header: 'Nikon\x00\x01\x00'
- Absolute offsets (relative to EXIF TIFF header)
- Inherits byte order from parent

Type 3 (modern cameras like D3, D700, Z series):
- 10-byte header + embedded TIFF header
- Relative offsets (to MakerNote start)
- Own byte order from embedded TIFF

Encrypted tags (LensData 0x0098, FlashInfo 0x00A8) are skipped.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@rpuneet rpuneet force-pushed the feat/nikon-makernote branch from 87d22db to dc102a7 Compare February 7, 2026 19:24
@rpuneet rpuneet merged commit c19be2b into main Feb 7, 2026
@rpuneet rpuneet mentioned this pull request Feb 8, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant