From d3e57c1bd17ad3e71810235a672d4782136901a5 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Mon, 10 Aug 2020 16:27:09 -0400 Subject: added exif capture back to photos --- app/photos/models.py | 2 +- app/photos/readexif.py | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'app') diff --git a/app/photos/models.py b/app/photos/models.py index 075808d..6253336 100644 --- a/app/photos/models.py +++ b/app/photos/models.py @@ -233,7 +233,7 @@ def post_save_events(sender, update_fields, created, instance, **kwargs): img = Image.open(instance.image.path) instance.height = img.height instance.width = img.width - #instance = readexif(instance) + instance = readexif(instance) post_save.disconnect(post_save_events, sender=LuxImage) instance.save() post_save.connect(post_save_events, sender=LuxImage) diff --git a/app/photos/readexif.py b/app/photos/readexif.py index 71416ff..70a6987 100644 --- a/app/photos/readexif.py +++ b/app/photos/readexif.py @@ -35,14 +35,6 @@ def readexif(image): image.exif_lens = meta["XMP:Lens"] except: pass - try: - image.point = Point(meta["XMP:GPSLongitude"], meta["XMP:GPSLatitude"], srid=4326) - try: - image.location = Location.objects.filter(geometry__contains=image.point).get() - except Location.DoesNotExist: - pass - except KeyError: - pass try: image.exif_aperture = meta["EXIF:FNumber"] except: -- cgit v1.2.3-70-g09d2