Skip to content

feat(makernote): add Fujifilm MakerNote parser#33

Merged
rpuneet merged 1 commit intomainfrom
feat/fujifilm-makernote
Feb 7, 2026
Merged

feat(makernote): add Fujifilm MakerNote parser#33
rpuneet merged 1 commit intomainfrom
feat/fujifilm-makernote

Conversation

@rpuneet
Copy link
Contributor

@rpuneet rpuneet commented Feb 7, 2026

Summary

  • Implements Fujifilm MakerNote parsing with FUJIFILM header detection and relative offset handling
  • Adds 80+ Fujifilm tag name mappings (SerialNumber, Quality, FocusMode, FilmMode, DynamicRange, etc.)
  • Registers Fujifilm handler in TIFF parser with proper priority ordering (Sony, Fujifilm, Canon)

Changes

  • internal/parser/tiff/makernote/fujifilm/fujifilm.go - Main handler implementation
  • internal/parser/tiff/makernote/fujifilm/lookup.go - Tag name mappings
  • internal/parser/tiff/makernote/fujifilm/fujifilm_test.go - Comprehensive unit tests
  • internal/parser/tiff/tiff.go - Register Fujifilm handler
  • internal/testing/ - ExactTagCount -1 for presence-only directory checks
  • api_integration_test.go - Updated CR2 test for Canon MakerNote

Key implementation details

  • Fujifilm MakerNotes use OffsetRelativeToMakerNote (offsets are relative to MakerNote start, not TIFF/EXIF base)
  • Always little-endian byte order
  • Header: 'FUJIFILM' (8 bytes) + 4-byte IFD offset

Test plan

  • All Fujifilm unit tests pass
  • All TIFF package tests pass
  • All integration tests pass
  • CR2 integration test updated to handle Canon MakerNote directory

🤖 Generated with Claude Code

Implements Fujifilm MakerNote parsing with:
- FUJIFILM header detection (8-byte signature + 4-byte IFD offset)
- Relative offset handling (offsets relative to MakerNote start)
- 80+ tag name mappings (SerialNumber, Quality, FocusMode, etc.)
- Comprehensive unit tests

Also updates:
- Register Fujifilm handler in TIFF parser with priority ordering
- Test framework: ExactTagCount -1 skips tag count validation
- CR2 integration test: Canon directory presence-only check

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Feb 7, 2026

Codecov Report

❌ Patch coverage is 43.80165% with 136 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...nternal/parser/tiff/makernote/fujifilm/fujifilm.go 42.12% 122 Missing and 14 partials ⚠️

📢 Thoughts on this report? Let us know!

@rpuneet
Copy link
Contributor Author

rpuneet commented Feb 7, 2026

tech-lead-02 Review: APPROVED ✅

Fujifilm implementation matches my research findings exactly.

Verified:

✅ Header: 'FUJIFILM' (8 bytes) + 4-byte IFD offset
✅ OffsetBase: OffsetRelativeToMakerNote (KEY DIFFERENCE from Sony/Canon)
✅ ByteOrder: Always little-endian
✅ 80+ tag mappings including FilmMode, FocusMode, SerialNumber
✅ Comprehensive tests (349 lines)

Key Implementation Details Correct:

  • resolveOffset uses makerNoteOffset + tagOffset for relative offsets
  • IFD offset read from bytes 8-11 (little-endian uint32)
  • Priority ordering: Sony → Fujifilm → Canon

CI passing (Build/Lint/Test/Coverage). Merging now!

@rpuneet rpuneet merged commit 02f42c3 into main Feb 7, 2026
6 of 7 checks passed
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