fix BUG-104 by only calling exif auto trans on jpegs, not all images
This commit is contained in:
10
shared.py
10
shared.py
@@ -121,9 +121,13 @@ def SymlinkName(ptype, path, file):
|
||||
def GenThumb(fname,auto_rotate):
|
||||
try:
|
||||
if auto_rotate:
|
||||
# run cmdline util to re-orient jpeg (only changes if needed, and does it losslessly)
|
||||
p = subprocess.run([PA_EXIF_ROTATER,fname] )
|
||||
im=Image.open(fname)
|
||||
im_orig = Image.open(fname)
|
||||
if im_orig.format == 'JPEG':
|
||||
# run cmdline util to re-orient jpeg (only changes if needed, and does it losslessly)
|
||||
p = subprocess.run([PA_EXIF_ROTATER,fname] )
|
||||
im=Image.open(fname)
|
||||
else:
|
||||
im=im_orig
|
||||
# if we don't autorotate/touch the original, we still want the thumbnail oriented the right way
|
||||
else:
|
||||
im_orig = Image.open(fname)
|
||||
|
||||
Reference in New Issue
Block a user