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

Image rotation doesn't maintain height and width #29

Open
Agrejus opened this issue Jun 13, 2023 · 0 comments
Open

Image rotation doesn't maintain height and width #29

Agrejus opened this issue Jun 13, 2023 · 0 comments
Labels
bug Something isn't working confirmed

Comments

@Agrejus
Copy link

Agrejus commented Jun 13, 2023

Describe the bug
When an image is rotated the height and width are not changed. For example, if we have an image with an orientation of 6, we need to rotate it 90 degrees to be viewed properly. When calling .rotate(270) on the image, black bars are added to the left and right of the image to maintain the original height and width. Rotating the image 90 degrees causes the height and width to be swapped, but it looks like the height and width are not swapped causing black bars on either side of the image.

Original Image: IMG_0156 - Copy (2) (1).jpeg
IMG_0156 - Copy (2) (1).jpeg

Resulting Bug: Bug.jpeg
bug.jpeg

To Reproduce
Steps to reproduce the behavior:

  1. Load attached image (IMG_0156 - Copy (2) (1).jpeg)
  2. Rotate image 270 degrees
  3. encode to JPEG
  4. View result

Expected behavior
I expect the image to be rotated and the height and width to be swapped because we rotated the image 90 degrees

Screenshots
See attached images for before and after

Platform:

  • OS: Windows 10
  • Environment: Chrome
  • Version: 1.2.16

Additional context
Add any other context about the problem here.

@Agrejus Agrejus added the bug Something isn't working label Jun 13, 2023
@Agrejus Agrejus changed the title [BUG] Image rotation doesn't maintain height and width Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed
Projects
None yet
Development

No branches or pull requests

2 participants