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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
108.46 KB
53.31 KB

Actually, 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

Status: Needs review » Needs work

The last submitted patch, 2: 2857260-2-test-only.patch, failed testing.

mondrake’s picture

Status: Needs work » Needs review
FileSize
56.14 KB
2.83 KB

Fix patch, using the 'mirror' operation where required.

mondrake’s picture

Category: Task » Bug report

  • mondrake committed 280da45 on 8.x-1.x
    Issue #2857260 by mondrake: Auto orientation: GD toolkit operation does...
mondrake’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.