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

Processed image is rotated from portrait to landscape #1104

Open
zadam opened this issue Nov 1, 2022 · 4 comments · May be fixed by #1285
Open

Processed image is rotated from portrait to landscape #1104

zadam opened this issue Nov 1, 2022 · 4 comments · May be fixed by #1285
Labels
bug there is a bug in the way jimp behaves help wanted

Comments

@zadam
Copy link

zadam commented Nov 1, 2022

Expected Behavior

Image should preserve the original portrait orientation.

Current Behavior

Code:

const image = await jimp.read(buffer);

const processed = await image.getBufferAsync(jimp.MIME_JPEG);

Will change the orientation from portrait to landscape for this image: IMG_5029.zip

  • Jimp Version: 0.16.1
  • Operating System: Ubuntu 22.04
  • Node version: 16.18.0
@hipstersmoothie hipstersmoothie added help wanted bug there is a bug in the way jimp behaves labels Feb 4, 2023
@babyrusa
Copy link

babyrusa commented Feb 6, 2023

I have the same issue too. Did you ever figure out why?

@hipstersmoothie
Copy link
Collaborator

my guess would be exif metadata isn't being re-encded. PRs welcome!

@Sarabadu Sarabadu mentioned this issue Jun 23, 2023
4 tasks
@Sarabadu
Copy link

@hipstersmoothie adder a PR trying to fix this issue #1247 , but seems like modifying the exif data also impact on the difference would appreciate an early review

@bobzel
Copy link

bobzel commented Dec 10, 2023

Is there a reasonably straightforward workaround? I moved to Jimp because of all the installation dependencies of using Sharp. However, sharp handled image orientations correctly and I don't have a good solution for Jimp.

@hipstersmoothie hipstersmoothie linked a pull request Mar 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug there is a bug in the way jimp behaves help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants