Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
There's a @todo in the AutoOrient GD toolkit operation to cover some cases of orientation that are currently not managed. ImageMagick is OK. Moreover, tests are missing to cover all cases.
Proposed resolution
- Use the newly introduced 'mirror' operation to meet the missing cases in GD
- Introduce a test set of images with all the possible EXIF orientation tags' values
- Add tests
Remaining tasks
User interface changes
none
API changes
none
Data model changes
none
Comment | File | Size | Author |
---|---|---|---|
#4 | interdiff_2-4.txt | 2.83 KB | mondrake |
#4 | 2857260-4.patch | 56.14 KB | mondrake |
#2 | all.png | 108.46 KB | mondrake |
Comments
Comment #2
mondrakeActually, the hard part here is getting test JPEG files. I ended up generating them programmatically.
All these differently oriented images, after autorotate operation, should end up being displayed as sample 1.
Here's a test patch to demonstrate GD failures.
EDIT:
see
http://www.impulseadventure.com/photo/exif-orientation.html
http://www.impulseadventure.com/photo/images/orient_flag.gif
Comment #4
mondrakeFix patch, using the 'mirror' operation where required.
Comment #5
mondrakeComment #7
mondrake