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

Bake input orientation into output image #194

Merged
merged 4 commits into from
Jan 15, 2024
Merged

Conversation

GHF
Copy link
Contributor

@GHF GHF commented Sep 25, 2023

The issue behind this and fix is basically the same as #158 but cleans up some of the approaches that led up to this—the big changes are

  1. rolling back some of the logic around calling sharp.rotate() and defaulting to just always calling it because it's designed to bake orientation as needed into the output (in lieu of passthrough metadata) and doing nothing if not needed
  2. adding an image diff test whose failure case demonstrates the need for orientation=3 processing (very common for iPhone photos)

GHF and others added 4 commits September 25, 2023 11:56
Revert 434a264 and move sharp.rotate()
introduced in 470873b so that it's
always run, in order to "bake" orientation into output images.

Co-authored-by: Dustin Lammiman <dustin@nosecreekweb.ca>
Add pixelmatch to devdeps and add a "golden image" test that ensures
images with orientation=3 have right-side-up output.
@zachleat zachleat added this to the Eleventy Image v3.1.9 milestone Jan 15, 2024
@zachleat
Copy link
Member

Same as #158 we’ll put this behind the fixOrientation opt-in option!

@zachleat zachleat merged commit 3662d92 into 11ty:main Jan 15, 2024
@zachleat zachleat added the enhancement New feature or request label Jan 15, 2024
zachleat added a commit that referenced this pull request Jan 15, 2024
@zachleat
Copy link
Member

zachleat commented Feb 2, 2024

Changed to v3.2.0

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

Successfully merging this pull request may close these issues.

2 participants