feat(makernote): add Canon MakerNote parser (MNI-2)#32
Closed
Conversation
Implements MNI-1 (Issue #10) - the foundation for manufacturer-specific MakerNote parsing in the TIFF/EXIF metadata pipeline. ## New Package: internal/parser/tiff/makernote/ - Handler interface: Manufacturer(), Detect(), Parse(), TagName() - Config struct: IFDOffset, OffsetBase, ByteOrder, HasNextIFD, Variant - Registry pattern with ordered detection for manufacturer routing - Detection functions for all major manufacturers: - Nikon Type 3: 'Nikon' + 0x02 (embedded TIFF header) - Nikon Type 1: 'Nikon' + 0x01 - Sony: 'SONY DSC' or 'SONY CAM' (12-byte header) - Fujifilm: 'FUJIFILM' (8-byte header + offset) - Canon: No header (IFD validation fallback) ## TIFF Parser Integration - Added handleMakerNote() to ifd.go for TagMakerNote (0x927C) - Integrated makernote.Registry into Parser struct - Preserves backward compatibility: returns raw MakerNote when no handler matches ## Offset Handling - OffsetAbsolute: Canon, Nikon T1/T2, Sony (relative to TIFF base) - OffsetRelativeToMakerNote: Fujifilm, Nikon T3 Closes #10 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement Canon-specific MakerNote parsing with support for 35+ tag types including CameraSettings, ImageType, SerialNumber, LensModel, and ModelID. Canon MakerNote format: - No header - IFD starts immediately at offset 0 - Byte order inherited from parent EXIF - Offsets are absolute (relative to EXIF TIFF header) Changes: - Add canon/canon.go with Parse() implementation for IFD parsing - Add canon/tags.go with tag constants and name mappings - Add canon/canon_test.go with comprehensive unit tests - Register Canon handler in tiff.go (last priority, fallback detection) - Update integration test to verify 28 Canon tags from CR2 files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
Author
|
Closing as obsolete - Canon parser already merged via PR #24. All Canon MakerNote functionality is in main. |
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
Canon MakerNote Format
Key Tags Supported
Test plan
go test ./...)Verification
🤖 Generated with Claude Code