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):
|
def GenThumb(fname,auto_rotate):
|
||||||
try:
|
try:
|
||||||
if auto_rotate:
|
if auto_rotate:
|
||||||
# run cmdline util to re-orient jpeg (only changes if needed, and does it losslessly)
|
im_orig = Image.open(fname)
|
||||||
p = subprocess.run([PA_EXIF_ROTATER,fname] )
|
if im_orig.format == 'JPEG':
|
||||||
im=Image.open(fname)
|
# 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
|
# if we don't autorotate/touch the original, we still want the thumbnail oriented the right way
|
||||||
else:
|
else:
|
||||||
im_orig = Image.open(fname)
|
im_orig = Image.open(fname)
|
||||||
|
|||||||
Reference in New Issue
Block a user