face region fixes for mirrored images

This commit is contained in:
Rhet Turnbull
2021-01-19 06:57:47 -08:00
parent 3cdfc8700d
commit bdc4b23f42
3 changed files with 1434 additions and 1424 deletions

View File

@@ -1,3 +1,3 @@
""" version info """ """ version info """
__version__ = "0.39.24" __version__ = "0.39.25"

View File

@@ -334,13 +334,23 @@ class FaceInfo:
orientation = self.photo.orientation orientation = self.photo.orientation
x, y = xy x, y = xy
if orientation in [1, 2]: if orientation == 1:
y = 1.0 - y
elif orientation == 2:
y = 1.0 - y y = 1.0 - y
elif orientation in [3, 4]:
x = 1.0 - x x = 1.0 - x
elif orientation in [5, 6]: elif orientation == 3:
x = 1.0 - x
elif orientation == 4:
pass
elif orientation == 5:
x, y = 1.0 - y, x
elif orientation == 6:
x, y = 1.0 - y, 1.0 - x x, y = 1.0 - y, 1.0 - x
elif orientation in [7, 8]: elif orientation == 7:
x, y = y, x
y = 1.0 - y
elif orientation ==8:
x, y = y, x x, y = y, x
else: else:
logging.warning(f"Unhandled orientation: {orientation}") logging.warning(f"Unhandled orientation: {orientation}")

File diff suppressed because it is too large Load Diff