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

Reading embedded image orientation information from file metadata #151

Open
AlexanderNeilson opened this issue Apr 5, 2020 · 0 comments
Labels

Comments

@AlexanderNeilson
Copy link

I have come to this via a few steps (un rotated image in a weasyprint PDF, through image metadata, through GDK-Pixbuf, through weasyprint source code, to here) so I have not had any involvement in this project and I also have very limited experience with the CFFI.

What I think I have found is that when calling GDK-Pixbuf the gtk.gdk.Pixbuf.apply_embedded_orientation function isn't being called so images with embedded orientation information (in my instance iPhone photos) are not having that information read and applied. In my case this is resulting in portrait orientation images displaying in PDF's as landscape. So far I am not convinced that this is a problem (I am setting height for these images to ensure I fit two stacked on an A4 page) so this way around makes best sense to me for my specific use case.

This behaviour differs from what I see loading the same image directly into google chrome which would often seem to be the default expectation by end users. However this not being the default any change may be more significant as people may have made assumptions / changes on their own that could conflict quite interestingly.

So I wanted to ask a question, considering the minimum required GDK-Pixbuf version already includes this "apply embedded orientation" function has this been considered as an option that should be used by default? or should be available as an option at calling time for users to knowingly switch to this if the current default is not their preference?

As I said I have limited experience in lower level coding and so any such pull request, even if I got it ready, would be expected to be rough compared to other code quality or calling it the "best" way.

Regards
Alexander

@liZe liZe added the feature label Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants