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

EXIF rotation is ignored #16

Closed
gregorni opened this issue Jun 24, 2023 · 4 comments
Closed

EXIF rotation is ignored #16

gregorni opened this issue Jun 24, 2023 · 4 comments
Labels
bug Something isn't working upstream Issue is caused by an upstream issue

Comments

@gregorni
Copy link
Collaborator

When converting images shot on a smartphone in portrait mode, the output is rotated anti-clockwise by 90°. This might have to do with the image metadata not being read properly, or at least not the part that tells that the image is rotated 90°.

jp2a and ascii-image-converter have the same issue

@gregorni
Copy link
Collaborator Author

Example photo:

2023-02-05-15-59-45-806

@FineFindus FineFindus added bug Something isn't working upstream Issue is caused by an upstream issue labels Jun 24, 2023
@FineFindus
Copy link
Owner

FineFindus commented Jun 24, 2023

Thanks for the report. The problem is that this isn't actually a rotated image, it's a horizontal image with EXIF data that rotates it. The image library used by artem does not support reading EXIF data, so this is not an easy problem to solve. While it is possible to implement code to read the EXIF, this would only partially solve the problem, as most EXIF readers do not support all available formats.

Perhaps support for rotating the image with a new argument would solve the problem?

@FineFindus FineFindus changed the title Phone portrait mode photos are rotated by 90° EXIF rotation is ignored Jun 24, 2023
@gregorni
Copy link
Collaborator Author

This does seem like an issue the library should fix, to be honest. I find it weird that nearly all ASCII converters have this issue, regardless of their programming language.

@FineFindus
Copy link
Owner

I'm closing this for now, as this is not the right place to track the upstream issue (which seems unlikely to be resolved soon). Feel free to reopen it if you disagree.

City-busz added a commit to City-busz/artem that referenced this issue Oct 31, 2024
The latest version of `image-rs` supports reading and applying orientation
metadata for JPEG, WebP and TIFF formats.

Reference: https://docs.rs/image/latest/image/enum.DynamicImage.html#method.apply_orientation

Implements: FineFindus#16
FineFindus pushed a commit to City-busz/artem that referenced this issue Oct 31, 2024
The latest version of `image-rs` supports reading and applying orientation
metadata for JPEG, WebP and TIFF formats.

Reference: https://docs.rs/image/latest/image/enum.DynamicImage.html#method.apply_orientation

Implements: FineFindus#16
FineFindus pushed a commit that referenced this issue Oct 31, 2024
The latest version of `image-rs` supports reading and applying orientation
metadata for JPEG, WebP and TIFF formats.

Reference: https://docs.rs/image/latest/image/enum.DynamicImage.html#method.apply_orientation

Implements: #16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Issue is caused by an upstream issue
Projects
None yet
Development

No branches or pull requests

2 participants