summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2020-08-10 16:27:09 -0400
committerluxagraf <sng@luxagraf.net>2020-08-10 16:27:09 -0400
commitd3e57c1bd17ad3e71810235a672d4782136901a5 (patch)
treeb471c82dcca6f3dd593fc0756244ae70bf1679f0
parent65fab42a04b2e9adc042145486ece2c47a64b5e9 (diff)
added exif capture back to photos
-rw-r--r--app/photos/models.py2
-rw-r--r--app/photos/readexif.py8
2 files changed, 1 insertions, 9 deletions
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
@@ -36,14 +36,6 @@ def readexif(image):
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:
pass