cbenning / fussel

A static photo gallery generator
https://github.com/cbenning/fussel
MIT License
265 stars 18 forks source link

auto rotate images by EXIF #54

Open mavack opened 3 years ago

mavack commented 3 years ago

Do you want to add a true/false for auto rotating the images to the correct orientation, your current resizes don't maintain EXIF so the output thumbs are sometimes orientated incorrect.

There are always ways to retain EXIF which might also allow the devices to draw correct orientation

Lots of ways to skin this cat, i just did the following which worked for me, but not sure what it would break on.

#            shutil.copyfile(photo, new_original_photo)
            im = Image.open(photo)
            im = ImageOps.exif_transpose(im)
            im.save(new_original_photo)
cbenning commented 1 year ago

I've implemented your suggestion in the v2 branch. Please let me know if it works for you?