t_2f17b1b4: Add EXIF GPS extraction to upload/photo and OCR endpoints

- _extract_gps_from_bytes helper reads GPSInfo IFD via PIL get_ifd()
- Converts DMS to decimal degrees, returns {lat, lng} or None
- /api/upload/photo: reads bytes first, extracts GPS before saving
- /api/ocr: extracts GPS from raw bytes before OCR processing
- exif_gps returned alongside path/machine_id in both endpoints
- Photos without EXIF GPS omit the exif_gps key entirely
- Raw file bytes preserved (no re-compression, no EXIF stripping)
This commit is contained in:
2026-05-21 17:17:38 -04:00
parent 5d2d169885
commit 7cf566ad6d
2 changed files with 692 additions and 943 deletions
+526 -920
View File
File diff suppressed because it is too large Load Diff