added ability to auto-rotate jpegs as we import them. The auto-rotation uses /usr/bin/exifautotran which rotates losslessly, and we optimised to then not also re-rotate the thumbmail. This address a few bugs in the 90s, including the one where Mandys photos were not getting faces (they were rotated), and without really doing anything the odd one where we sometimes lost tmp_locn on first load after db recreation - I cant reproduce so ignoring it

This commit is contained in:
2022-07-15 17:18:31 +10:00
parent 6d1801dce9
commit 84a4cf7cf8
6 changed files with 57 additions and 14 deletions

View File

@@ -97,7 +97,8 @@ class PersonForm(FlaskForm):
def AddRefimgToPerson( filename, person ):
refimg = Refimg( fname=os.path.basename( filename ) )
try:
refimg.thumbnail, refimg.orig_w, refimg.orig_h = GenThumb( filename )
#False == dont autorotate, its not needed on this image
refimg.thumbnail, refimg.orig_w, refimg.orig_h = GenThumb( filename, False )
settings = Settings.query.first()
model=AIModel.query.get(settings.default_refimg_model)
refimg.face, face_locn = GenFace( filename, model=model.name )