✨ feat: exposer les métadonnées EXIF (date + réglages photographe)#38
Merged
Conversation
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.
Closes #37
Contexte
Le package extrait la preview JPEG mais n'exposait pas les métadonnées EXIF du RAW. Le parseur TIFF (
TiffReader/IfdEntry) lit déjà les IFD génériquement et connaîtExifIfdPointer— l'infra était là.Changements
RawMetadata(nouveau) : value object nullable —dateTimeOriginal,fNumber,exposureTime,iso,focalLength,lensModel,cameraMake,cameraModel+isEmpty().ExtractedPreview: nouveau paramètre optionnel?RawMetadata $metadata = null— non-breaking (compatible 1.1).TiffReader: préserve numérateur ET dénominateur des rationnels (avant : numérateur seul, insuffisant pour f-number/vitesse/focale).IfdEntry::rational()/rationalPair().TiffTag: 6 tags EXIF déclarés (ExposureTime, FNumber, IsoSpeedRatings, DateTimeOriginal, FocalLength, LensModel).TiffPreviewParser: lit Make/Model (IFD0) + suitExifIfdPointer→ EXIF IFD → mappe les réglages ; formate la vitesse en fraction (« 1/250 »).metadatadans le README etdocs/index.md.Portée
TIFF-based (CR2/NEF/ARW/DNG) via
ExifIfdPointer. CR3 (ISO-BMFF) : preview OK,metadata=nullpour l'instant (dégradation gracieuse). Tout est nullable.Tests
185 tests, 303 assertions (174 existants intacts + 11 nouveaux) :
IfdEntryrationnel,RawMetadata, et un test bout-en-bout sur TIFF synthétique avec sous-IFD EXIF (f/2.8, 1/250, ISO 400, 50 mm, objectif, date, appareil).composer validate --strictOK ; aucun Symfony hors bridge.Suite
Release cible 1.2.0. Consommé ensuite par HomeCloud (require ^1.2) pour le « pack photographe ».