OK, there's a first version of my first zenphoto plugin. There's currently no homepage for it, but the code can be fetched from Gitorious:
http://gitorious.org/zenphoto-plugins/filter_jpegrotation_lossless
What it does currently:
When importing JPEG images to an album, this filter checks for the EXIFOrientation value and when this value suggests that the image must be rotated, it rotates the image and updates the EXIFOrientation value accordingly, so that the image will not be rotated again.
Requirements:
- jpegtran executable must be available on the server (http://jpegclub.org/, Debian/Ubuntu: "sudo apt-get install libjpeg-progs")
- put the plugin files (file "filter-jpegrotation-lossless.php" and folder "filter-jpegrotation-lossless" with all it's contents) into your zenphoto/plugins folder
- plugin must be enabled
- in the plugin settings for filter_jpegrotation_lossless you must explicitly enable auto rotation on import, and you must specify the path to jpegtran on your system
Notes:
- Unlike the traditional auto_rotate feature of Zenphoto, this filter alters the original uploaded image! Normally, this should do no harm because the rotation is lossless and can be repeated without loosing image quality.
- There is no problem if auto_rotate in Zenphoto is enabled: it simply does nothing if the image is already rotated.
Not yet implemented:
- Manual lossless rotation of images in the admin/edit interface