Skip to content

Conversation

@CarlSchwan
Copy link
Member

Now do the operation in two steps:

  1. Rotate the image according the exif data
  2. Do the actual operation

This should only have a performance impact on image with exif rotation
data to do the rotation. For all the other images the autorotate steps
should be almost instant.

Now do the operation in two steps:

1. Rotate the image according the exif data
2. Do the actual operation

This should only have a performance impact on image with exif rotation
data to do the rotation. For all the other images the autorotate steps
should be almost instant.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan CarlSchwan self-assigned this Apr 4, 2022
@artonge
Copy link
Contributor

artonge commented Apr 4, 2022

Why do it in two steps instead of one?

@CarlSchwan
Copy link
Member Author

Why do it in two steps instead of one?

It's actually only one step /pipeline with two operations in it. Since imaginary can't do two operations at the same time, you do them sequentially.

@artonge
Copy link
Contributor

artonge commented Apr 4, 2022

Why do it in two steps instead of one?

It's actually only one step /pipeline with two operations in it. Since imaginary can't do two operations at the same time, you do them sequentially.

So the rotation wasn't done previously?

@CarlSchwan
Copy link
Member Author

Why do it in two steps instead of one?

It's actually only one step /pipeline with two operations in it. Since imaginary can't do two operations at the same time, you do them sequentially.

So the rotation wasn't done previously?

From that I understood, image can be either rotated by rotating the pixel position or by adding some exif metadata to tell the image viewer that the image is rotated. It seems that libvps or imaginary didn't handle the case of the exif metadata rotation correctly as it tried to do the croping with the not rotated dimension creating a disturbed image.

So now when we see exif rotation metadata, we first rotate the pixels to match the EXIF metadata and then do the cropping. For images without exif rotation metadata, the autorotate step is skipped as there is nothing to do.

@CarlSchwan CarlSchwan requested a review from skjnldsv April 5, 2022 10:06
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PVince81 PVince81 merged commit 40f6f60 into master Apr 5, 2022
@PVince81 PVince81 deleted the fix/exif-imaginary branch April 5, 2022 13:39
@blizzz blizzz mentioned this pull request Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants