-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix issue in orientation of images #21458
Conversation
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
} | ||
|
||
return image; | ||
} | ||
|
||
static UIImageOrientation ToUIImageOrientation (CGImageSource cgImageSource) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code format is not quite right :) seems mono days? we provide the rules in a .editorconfig..
Our dotnet format on this file only will also work.
Will this be a breaking change? Like before images will always appear UP and now can show in a different orientation? Should we target this only to net9 ? |
Not really, no. It restores correct behavior that was in place before February 16th. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a UITest? our docs are somewhat lacking in that area but you can see an example here.
I think you could either do a screen shot or check the dims of the image to make sure it renders the right direction
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Commenter does not have sufficient privileges for PR 21458 in repo dotnet/maui |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Commenter does not have sufficient privileges for PR 21458 in repo dotnet/maui |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/rebase |
bd19057
to
40b3a74
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Test failures unrelated |
Description of Change
Added code to retrieve image orientation from the metadata, translate it and apply it to the image constructor.
Issues Fixed
Fixes #21314
In brief, pull the image properties from the
CGImageSource
and translate it to the values for the UIImage constructor.The conversion code was based on this documentation from Apple.