Exif data capture
English translation at the end Lorsqu'on envoie des photos (voir des vidéos), il pourrait être intéressant , en même temps , de récupérer quelques données exif (il semble exister exif-js) pour les données en tant que metadata associée à la photo. Ces exif pourraient alors, ultérieurement, être affichées (par exemple en dessous d'une photo affichée en plein écran, ou si on a la position, dans une mini-map, mais cela sera pour une autre version :) ).
Voici quelques exif que je pense qui aident à contextualiser une photo de façon assez complète (une première liste hardcodée me semble plus facile à mettre en place qu'une liste paramétrable :)) Certaine sont plus à destination d'un public avertis, mais représente vraiment que peu de taille et de travail a récupérer en plus des autres et donc serait dommage de s'en passer :)
- date de prise de vue
- Modèle de l'appareil
- focale équivalent 35mm (ou focale + crop factor) , ou champ de vision
- distance de mise au point / distance hyperfocale
- vitesse de l'obturateur
- ouverture
- flash
- type de mesure (spot, pondérée, ...)
- toutes les informations de position (alt , lat , long, direction,date)
=== When picture or video are uploaded, it could be useful to get and store some exif metadata if they are present. In javascript, exif-js seems to help in retrieving and/or parsing theses metadata. Once we got theses exif in our database, we could then , in another version, present them (for example under a fullscreen picture, or the location in a minimap).
On the following list, there are some exif that I think are the most useful to a viewer. Some are specifics to enthusiast, but with the little size of theses data and the little overwork needed make me proposes them.
- Creation Date
- Camera Model Name
- Focal Length (if possible in 35mm equivalent, or with the crop factor if it exist), and/or field of view
- focusing distance and/or Hyperfocal distance and/or focus range
- Shutter Speed
- Aperture
- flash
- metering type
- GPS information as altitude, latitude, longitude, direction and date
In order to do this properly, I'll need first to introduce code splitting to the webapp since exif-js is 40Ko (One third of the current webapp size).
I think that it's mandatory to give the user the choice of capturing the exif data or not (so I need to add an opt-in option for that).
I'm not really efficient in javascript type of code, so I could not really help on webapp architecture or split :'(. (Could we not just add a <script...> in index.php ?) Howerver if you have simple tasks to do in php, I could try to help (once I undestand how the debug and the architecture of symfony works :))
The webapp code is distinct from the API, so it would not be a
On the backend side, there's not a lot to change but a change in the data structure to add a generic "$data" field to the files (so that we have a place to store the exif data and future things as well). Since there's a data structure change, it will not be before the 0.4.
I'm glad that you want to help !
Since the backend code is going to change a lot for the 0.4 (I plan to drop api-platform), the best way you can help me for now is by using Zusam and spotting bugs. I'll try my best to put the code in a state where it's easier to contribute for the next big update.
I started working on the next major version on thought long bout this proposal. I have the intend of making Zusam as a tiny, stable and extensible core. I plan to add a plugin system on the backend and the frontend for non-core uses. With that in mind, I think that this proposal will be a perfect frontend plugin (I'll add a generic data field for the files on the backend anyway).
I'm going to write a document describing what should go inside the core and what should be a plugin. If this proposal gets the plugin status, it will postponed it until the plugin system is in place (I hope for the 0.5).
Does this seem right for you ?
A KISS and modular approach will always get my approval :)
Doesn't hesitate to ask if I can do something :)