Skip to content

Image rotation doesn't maintain height and width #29

@Agrejus

Description

@Agrejus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions