diff --git a/core/views/caves.py b/core/views/caves.py
index 1008b7a..a0bc2ea 100644
--- a/core/views/caves.py
+++ b/core/views/caves.py
@@ -54,12 +54,6 @@ todo = """
own directory 16xx/NNN/ even if they have no images to put in it.
"""
-# def cavepagefwd(request, karea=None, subpath=None):
- # """archaic, just send to the caves list page
- # """
- # return redirect("/caves")
-
-
def get_cave_from_slug(caveslug):
"""Needs refactoring
"""
diff --git a/core/views/editor_helpers.py b/core/views/editor_helpers.py
index 992e13b..d494cfd 100644
--- a/core/views/editor_helpers.py
+++ b/core/views/editor_helpers.py
@@ -92,6 +92,21 @@ def reorient_image(img, exif_dict):
# print(f"reorient_image(): found ImageIFD.Orientation in 0th ")
# for ifd in exif_dict:
# print(f"reorient_image(): \"{ifd}\"\n {exif_dict[ifd]} ")
+
+ # documentation from http://sylvana.net/jpegcrop/exif_orientation.html
+ # for i
+ # do
+ # case `jpegexiforient -n "$i"` in
+ # 1) transform="";;
+ # 2) transform="-flip horizontal";;
+ # 3) transform="-rotate 180";;
+ # 4) transform="-flip vertical";;
+ # 5) transform="-transpose";;
+ # 6) transform="-rotate 90";;
+ # 7) transform="-transverse";;
+ # 8) transform="-rotate 270";;
+ # *) transform="";;
+ # esac
orientation = exif_dict["0th"].pop(piexif.ImageIFD.Orientation)
if orientation == 2:
@@ -226,8 +241,10 @@ def extract_gps(dict):
print(altitude)
print(timestamp_utc)
# location = dms2dd() # to do...
+ rotate_this = f"?to_be_rotated" # this should rotate the i/ and t/ images and then re-render the same page.
+ rotate_button = f"
↺ rotate this image"
- return f"{direction}
{location}
{altitude}{timestamp_utc}
"
+ return f"{rotate_button}
{direction}
{location}
{altitude}{timestamp_utc}
"
def fix_dump_bugs(exif_dict):
"""piexif has several bugs, this gets around it.