Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

✅ Completed: Enhanced HEIC and AVIF Metadata Extraction

Summary

Successfully enhanced HEIC and AVIF formats to have the same comprehensive metadata extraction as JPEG, TIFF, and WebP formats.

Changes Implemented

  • Enhanced HEIC parseTIFFExif to parse all IFD0 tags
  • Added parseExifSubIFD method to HEIC for camera settings
  • Added parseGPSIFD method to HEIC for GPS coordinates
  • Enhanced AVIF with same improvements
  • Added safety bounds checks for malformed data
  • Updated tests for new metadata fields (19 fields total)
  • Updated documentation (README.md and docs/)
  • All 466 tests pass
  • Code review completed and feedback addressed
  • CodeQL security scan completed (0 alerts)
  • Precommit checks pass

Metadata Fields Supported (19 total)

IFD0 Tags (9 fields):

  • creationDate, description, author, copyright
  • cameraMake, cameraModel, orientation, software

Exif Sub-IFD Tags (8 fields):

  • iso, exposureTime, fNumber, focalLength
  • flash, whiteBalance, lensMake, lensModel, userComment

GPS IFD (2 fields):

  • latitude, longitude

Security Summary

  • No vulnerabilities discovered during CodeQL analysis
  • All EXIF parsing loops have proper bounds checks (max 100 entries)
  • Safe handling of malformed EXIF data with try-catch blocks
  • Proper bounds checking before reading data from buffers
Original prompt

make sure the latest formats (HEIC and AVIF has the same metadataextration (if possible) as other formats


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 10, 2025 22:45
Added comprehensive EXIF parsing including:
- IFD0 tags: description, author, copyright
- Exif Sub-IFD tags: flash, whiteBalance, lensMake, lensModel, userComment
- GPS IFD: full latitude/longitude parsing
- Updated field count from 11 to 19 fields in both formats
- Updated README and documentation to reflect enhanced support

Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com>
- Added upper bounds (100 entries max) to parseExifSubIFD loops in HEIC and AVIF
- Added upper bounds (100 entries max) to parseGPSIFD loops in HEIC and AVIF
- Prevents excessive iterations with malformed EXIF data

Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com>
@Hexagon Hexagon marked this pull request as ready for review December 10, 2025 22:51
@Hexagon Hexagon merged commit 7580e47 into main Dec 10, 2025
10 checks passed
Copilot AI requested a review from Hexagon December 10, 2025 22:52
@Hexagon Hexagon deleted the copilot/update-metadata-extraction-formats branch December 21, 2025 00:26
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