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

Exif rotation #234

Closed
swissspidy opened this issue Dec 3, 2023 · 3 comments
Closed

Exif rotation #234

swissspidy opened this issue Dec 3, 2023 · 3 comments
Labels
enhancement New feature or request unconfirmed

Comments

@swissspidy
Copy link
Owner

swissspidy commented Dec 3, 2023

Read exif data, rotate image if necessary, remove rotation header afterwards

See https://github.com/mattiasw/ExifReader

Vips' thumbnail functions also look at exif headers and rotate if necessary. But what about the full size?

Related:

Sample image:

CarolinaRaptorCenter_2005_0132

(orientation: 3)

The Exif orientation flag can have nine different values from 1 to 9:

image

Typically, you will only get flag 1, 8, 3, 6 for digital photos. Flag 2, 7, 4, 5 represent mirrored and rotated version of images.

(source)

@swissspidy swissspidy added enhancement New feature or request unconfirmed labels Dec 16, 2023
@swissspidy
Copy link
Owner Author

At the moment this doesn't seem to be an actual issue. The sample image above is always displayed correctly no matter where I look at it, and the blurhash looks correct as well. So not sure if there is really something that needs to be changed 🤷

@swissspidy swissspidy closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2024
@swissspidy
Copy link
Owner Author

@adamsilverstein since you brought up https://github.com/WordPress/wordpress-develop/blob/b4eeefe786100fc8a9e7d0650aeddee3825b9451/src/wp-includes/class-wp-image-editor.php#L500-L570, would love your thoughts on this, maybe you can reproduce this?

Right now it seems to "just work" and no action is needed, but maybe I'm wrong.

@swissspidy
Copy link
Owner Author

Good repo I found: https://github.com/recurser/exif-orientation-examples

I guess my point is: if the browser already handles this nowadays, I don't see the need for handling this also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request unconfirmed
Projects
None yet
Development

No branches or pull requests

1 participant