Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images with exif orientation set fail may not be orientated correctly #5462

Closed
ssddanbrown opened this issue Jan 31, 2025 · 1 comment
Closed

Comments

@ssddanbrown
Copy link
Member

We are specifically setting rotation based upon exif via our own custom means:

/**
* Orientate the given intervention image based upon the given original image data.
* Intervention does have an `orientate` method but the exif data it needs is lost before it
* can be used (At least when created using binary string data) so we need to do some
* implementation on our side to use the original image data.
* Bulk of logic taken from: https://github.com/Intervention/image/blob/b734a4988b2148e7d10364b0609978a88d277536/src/Intervention/Image/Commands/OrientateCommand.php
* Copyright (c) Oliver Vogel, MIT License.
*/
protected function orientImageToOriginalExif(InterventionImage $image, string $originalData): void

This can now lead to images being wrongly rotated, due to changes in intervention 3 which would apply orientation by default, leading to the the orientation being applied double.
This is mentioned in the upgrade notes, but quite easy to miss which I did.

Somewhat related to some of the newer comments in #4875.

@ssddanbrown ssddanbrown added this to the v24.12.2 milestone Jan 31, 2025
@ssddanbrown ssddanbrown self-assigned this Jan 31, 2025
ssddanbrown added a commit that referenced this issue Jan 31, 2025
Prevents double rotation caused from both our own orientation handling
upon that invervention was auto-applying since v3.

Fixes #5462
@ssddanbrown
Copy link
Member Author

Changes made in 4f5f7c1 and part of #5463 to be merged for the next patch/feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant