Skip to content

Commit

Permalink
some additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
cquest committed Jul 16, 2023
1 parent a7d972c commit 58da3e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/blur/blur.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ def blurPicture(picture, keep):
jpg.write(picture.file.read())
jpg.seek(0)
tags = exifread.process_file(jpg, details=False)
print("original", os.path.getsize(tmp))

# solve image orientation
if 'Image Orientation' in tags:
if 'normal' not in str(tags['Image Orientation']):
subprocess.run('exiftran -a %s -o %s' % (tmp, tmp+'_tmp'), shell=True)
print("after exiftran", os.path.getsize(tmp+'_tmp'))
os.replace(tmp+'_tmp', tmp)

# get picture details
Expand Down

0 comments on commit 58da3e0

Please sign in to comment.