-
Notifications
You must be signed in to change notification settings - Fork 1.2k
EXIF Orientation Support #1379
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 Orientation Support #1379
Conversation
@blikblum @liborm85 @devongovett any eyes on this would be greatly appreciated. Thanks! |
@blikblum @liborm85 @devongovett |
IMO obeyOrientation should be true by default. This seems to be the default behavior in other programs . I will test in some apps to see if they obey orientation by default |
@blikblum @liborm85 @devongovett Where do we land on the default behavior? Should we have it obey orientation by default? Or not? Let me know and I'm happy to refactor this. |
@fstrube Can we merge this change looks good to me |
I don't have maintainer privileges so I can't make the merge myself. I was waiting on feedback whether or not I should refactor this to obey orientation by default instead of relying on options. |
@fstrube @liborm85 @devongovett , my take on the default behaviour would to be that in order to ensure that existing consumers/users are not effected by this change the default behaviour should match the existing behaviour which is to obey orientation in EXIF meta and execute the translation.
|
Hi @blikblum, I'd like to resume work on this PR and get it ready to merge. Do you think it is good as-is? Or do you think I should change the behavior to be |
Yes. I want only see how other apps or libraries behave when you add a rotated image. I believe it does but want be sure. |
Hi, i finally got time to look at some pdfkit issues. I investigated how other tools / programs handle exif images by default: PDF Editors
Text processors
Web Engines
So, while behaviors differ, i think the most reasonable one is to obey the orientation by default because: 1. the main tools do 2. is more ergonomic for the developer (do not need to check if a image is rotated or not) Given this, i will adapt this PR to obey orientation by default. Will add a option ignoreOrientation to opt out |
Commited in #1482 |
What kind of change does this PR introduce?
This change adds support for obeying the EXIF orientation on JPEG images. To avoid introducing a breaking change, this PR introduces an
obeyOrientation
option on both thePDFDocument
constructor and thePDFDocument#image()
function, which defaults tofalse
.The following dependencies have been added in this branch:
Checklist:
Related Issues: