Summary
demos/README.txt tells users to "Drop .jpg/.heic photos in this folder", and the project description mentions broad image support, but geolens.core only parses JPEG APP1 segments:
_find_exif_segment() returns None unless the file starts with the JPEG SOI marker (\xff\xd8) and then walks JPEG markers to find an APP1 Exif\x00\x00 payload.
- HEIC/HEIF stores EXIF inside an ISO-BMFF box structure (
ftyp/meta/iinf/iloc → Exif item), not a JPEG APP1 marker. A .heic file therefore returns {} (no EXIF) even when it is fully geotagged.
- PNG (
eXIf chunk) and TIFF are likewise unsupported.
This is a silent correctness gap: a geotagged HEIC (the default iPhone format) reports "no location metadata", which is exactly the wrong answer for a triage tool.
Repro
from geolens.core import extract_exif
extract_exif(open("geotagged.heic", "rb").read()) # -> {} even with GPS present
Options
- Honest fix (docs): narrow the advertised support to JPEG until other containers are implemented — update
demos/README.txt and the README.
- Real fix (feature): add an ISO-BMFF walker to locate the
Exif item in HEIC/HEIF and hand its TIFF payload to the existing IFD parser (the TIFF/IFD code is already container-agnostic once you have the Exif\x00\x00-prefixed bytes). PNG eXIf is a smaller add.
Standard-library-only is feasible for both (both are just structured binary parsing, like the existing JPEG walker).
Summary
demos/README.txttells users to "Drop .jpg/.heic photos in this folder", and the project description mentions broad image support, butgeolens.coreonly parses JPEG APP1 segments:_find_exif_segment()returnsNoneunless the file starts with the JPEG SOI marker (\xff\xd8) and then walks JPEG markers to find anAPP1Exif\x00\x00payload.ftyp/meta/iinf/iloc→Exifitem), not a JPEG APP1 marker. A.heicfile therefore returns{}(no EXIF) even when it is fully geotagged.eXIfchunk) and TIFF are likewise unsupported.This is a silent correctness gap: a geotagged HEIC (the default iPhone format) reports "no location metadata", which is exactly the wrong answer for a triage tool.
Repro
Options
demos/README.txtand the README.Exifitem in HEIC/HEIF and hand its TIFF payload to the existing IFD parser (the TIFF/IFD code is already container-agnostic once you have theExif\x00\x00-prefixed bytes). PNGeXIfis a smaller add.Standard-library-only is feasible for both (both are just structured binary parsing, like the existing JPEG walker).