thibaud-rohmer / PhotoShow

A free web gallery in PHP with drag-n-drop support
http://www.photoshow-gallery.com
502 stars 151 forks source link

Exiftran for seamless photos rotations #363

Closed astyonax closed 6 years ago

astyonax commented 6 years ago

Hi,

I implemented the option to rotate the photos accordingly to their exif tags using exiftran (which does lossless rotation, as a plus). The rotation is done once for all when the photo is uploaded.

Changes:

  1. Image.php: I added the code in Image.php to handle the rotation
  2. AdminUpload.php: one function call just below the video conversion call
  3. Settings.php: Added settings configuration
  4. default.ini: added the new strings
  5. Dockerfile for both docker images are updated with the new dependency (exiftran, indeed)

Use case: I share the folder Photos with a dlna server which is not able to rotate the photos for the players. Plus, in my setup the patch in #312 (in #322) does not seem to work at all.

I am by no means a php programmer, but I hope my code is good enough to be merged. Let me know your comments :)

thibaud-rohmer commented 6 years ago

Cool !

astyonax commented 6 years ago

Done and pushed. I'll make a PR later today