HOME

FolkeHacks - Gallery Autorotate Bugfix

Gallery Autorotate Bugfix

This is a hack for gallery (gallery.sf.net)

If your camera writes the orientation bit into the exif-header then gallery will rotate automatically the images after uploading, but the orientation bit isn't cleared. If you copy that image to another gallery-folder or if anyone downloads that image it will be rotated again... - That's a bug!

Here is a dirty hack for gallery which resets that tag after autoration.

Note: In latest gallery it is partially fixed. When copying/moving images inside gallery the image isn't autorotated twice, but the exif-field isn't cleared.

The following has to be set in gallery/config.php (to enable autorotation):
$gallery->app->use_exif = "/usr/bin/jhead";
$gallery->app->autorotate = "yes";

Download:
Patch for gallery-1.4.3: gallery-autorotate-reset.diff
Don't apply to 1.4.4 and above!

Back to FolkeHacks



HOME

© 1999-2018 by Folke Ashberg | <>