Skip to content

Conversation

@rpuneet
Copy link
Contributor

@rpuneet rpuneet commented Dec 9, 2025

Summary

This PR improves tag extraction clarity and fixes IPTC repeatable field handling.

Changes

1. EXIF Tag IFD Prefixing

  • Add IFD prefix to all EXIF tags for clarity
  • Tags now include their IFD origin: IFD0:, IFD1:, ExifIFD:, GPS:
  • Example: IFD0:XResolution (image resolution) vs IFD1:XResolution (thumbnail resolution)
  • Benefit: Clear differentiation between tags from different IFDs

2. IPTC Repeatable Field Aggregation

  • Fix handling of repeatable IPTC fields (Keywords, etc.)
  • Now properly aggregates values into arrays at parse time
  • Before: Created indexed tags like Keywords[0], Keywords[1]
  • After: Single tag with array value Keywords: ["Ascot", "Ascot Woods", ...]
  • Benefit: Correct data structure, easier to consume

3. Test Updates

  • Updated all EXIF and IPTC tests to reflect new naming conventions
  • All tests pass ✅

4. Documentation

  • Added future enhancement to ROADMAP: human-readable value conversions
  • Documented plans for APEX, enum, and GPS coordinate formatting

Validation

  • Validated against testdata/goldens/jpeg/canon_xmp.jpg
  • All 8 IPTC Keywords now properly extracted and aggregated
  • IFD prefixes correctly differentiate image vs thumbnail metadata
  • No breaking changes to API, only to tag naming convention

Test Coverage

  • ✅ All tests pass
  • ✅ 100% coverage maintained
  • ✅ Integration tests validate real-world EXIF/IPTC extraction

🤖 Generated with Claude Code

- Add IFD prefix to all EXIF tags for clarity (IFD0:, IFD1:, ExifIFD:, GPS:)
  This clearly differentiates tags from different IFDs (e.g., IFD0:XResolution
  vs IFD1:XResolution for image vs thumbnail resolution)

- Fix IPTC repeatable field handling - aggregate into arrays at parse time
  Keywords and other repeatable IPTC fields are now properly collected into
  arrays during extraction rather than creating separate indexed tags

- Update tests to reflect new tag naming conventions

- Document future human-readable value conversions in ROADMAP
  (APEX values, enum descriptions, GPS coordinates, etc.)

All tests pass. This improves clarity and correctness of metadata extraction.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@rpuneet rpuneet merged commit c9621c1 into main Dec 9, 2025
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.

2 participants