Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display more image metadata #77

Closed
craumix opened this issue Jan 1, 2021 · 8 comments
Closed

Display more image metadata #77

craumix opened this issue Jan 1, 2021 · 8 comments
Labels
backend enhancement New feature or request frontend good first issue Good for newcomers

Comments

@craumix
Copy link
Contributor

craumix commented Jan 1, 2021

From what I can make out, currently only geolocation and the timestamp are exported from the imported images. (Please feel free to close this if I'm wrong)

I think it would be important to import all of an images metadata, especially for RAW images.

@derneuere derneuere added the enhancement New feature or request label Jan 1, 2021
@derneuere
Copy link
Member

This is related to #10

All the exif data is saved as a json here:

exif_json = JSONField(blank=True, null=True)

And set here:

librephotos/api/models.py

Lines 305 to 312 in 7f3d175

def _extract_date_time_from_exif(self):
date_format = "%Y:%m:%d %H:%M:%S"
timestamp_from_exif = None
with open(self.image_path, 'rb') as fimg:
exif = exifread.process_file(fimg, details=False)
serializable = dict(
[key, value.printable] for key, value in exif.items())
self.exif_json = serializable

And here:

librephotos/api/models.py

Lines 342 to 348 in 7f3d175

def _extract_gps_from_exif(self):
with open(self.image_path, 'rb') as fimg:
exif = exifread.process_file(fimg, details=False)
serializable = dict(
[key, value.printable] for key, value in exif.items())
self.exif_json = serializable
if 'GPS GPSLongitude' in exif.keys():

But yeah, we should import all the metadata as own fields and display it in the frontend. Do you have a list of what fields we should add?

@craumix
Copy link
Contributor Author

craumix commented Jan 2, 2021

I'm not sure if exporting all the metadata as own fields is necessary since it only needs to be displayed...
But if you want to go that route I would probably choose something similar to what Photoprism shows so:

  • Altitude
  • Camera
  • ISO
  • Exposure
  • Lens
  • F Number
  • Focal Length

@wahlis
Copy link

wahlis commented Jan 7, 2021

I would recommend to also read the IPTC info like keywords, caption etc. See https://www.carlseibert.com/guide-iptc-photo-metadata-fields/ for a photographers idea about what to use

@robertcontois
Copy link
Contributor

I've rewritten most of the EXIF read portion of the code to be more efficient and updated the module that reads the EXIF data to support any file format supported by exiftool (https://exiftool.org/#supported). Other code needs to be changed for those new files types to be imported, but when that happens we'll be able to read the EXIF data.

We're still working on an efficient way to store the information and display it but it's not trivial.

@totti4ever
Copy link

Great you are working on this, just want to second that request. Extended request would be to search for it :-)

@craumix craumix changed the title Import all exif metadata Display more image metadata Jan 23, 2021
@tbrtje
Copy link

tbrtje commented Feb 2, 2021

+1, that would be awesome. If it is possible to implement after this is done, editing things like keywords or other metadata from the webif would be neat too

@derneuere
Copy link
Member

More exif data fields are now in the backend. It now just has to be implemented in the web view.

@wjbeckett
Copy link

This is amazing.
Definitely looking forward to more exif data being visible. Would this also make it easier to search and show images based on similar EXIF data? For example, all photos taken with that camera?

Will there need to be a rescan of the photos to have this data viewed in the frontend?

AnkurPrabhu pushed a commit to AnkurPrabhu/librephotos that referenced this issue Oct 22, 2023
Frontend changes to allow the user to specify the default timezone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend enhancement New feature or request frontend good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

7 participants