zusam icon indicating copy to clipboard operation
zusam copied to clipboard

Exif data capture

Open briaeros opened this issue 6 years ago • 5 comments

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 :)

  1. date de prise de vue
  2. Modèle de l'appareil
  3. focale équivalent 35mm (ou focale + crop factor) , ou champ de vision
  4. distance de mise au point / distance hyperfocale
  5. vitesse de l'obturateur
  6. ouverture
  7. flash
  8. type de mesure (spot, pondérée, ...)
  9. 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.

  1. Creation Date
  2. Camera Model Name
  3. Focal Length (if possible in 35mm equivalent, or with the crop factor if it exist), and/or field of view
  4. focusing distance and/or Hyperfocal distance and/or focus range
  5. Shutter Speed
  6. Aperture
  7. flash
  8. metering type
  9. GPS information as altitude, latitude, longitude, direction and date

briaeros avatar Jul 30 '19 22:07 briaeros

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).

nrobinaubertin avatar Jul 31 '19 05:07 nrobinaubertin

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 :))

briaeros avatar Jul 31 '19 22:07 briaeros

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.

nrobinaubertin avatar Aug 01 '19 06:08 nrobinaubertin

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 ?

nrobinaubertin avatar Sep 06 '19 08:09 nrobinaubertin

A KISS and modular approach will always get my approval :)

Doesn't hesitate to ask if I can do something :)

briaeros avatar Sep 07 '19 13:09 briaeros