-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: add "uprightWidth" and "uprightHeight" properties to Ti.Blob #11936
Conversation
Fixes TIMOB-28093
Tests:
|
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.
CR: PASS
Although I'm okay with this change, I think it would have been nice to add Ti.Blob.exif
where some EXIF properties could be exposed. We could start with the corrected width
, height
and rotation
then add things like latitude
, longitude
and model
in the future. This means we wouldn't need to deprecate these properties in the future when we eventually refactor our image loading code and they wouldn't be redundant on iOS (as width and height is already corrected for rotation).
@garymathews , I think adding an "exif" property would be useful too. It just wouldn't be an easy drop-in for existing code that's calculating things based off the blob's width/height. The new "uprightWidth"/"uprightHeight" properties are an easy drop-in. I'm not thrilled about adding these properties either, but we need to do something. |
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.
FR Passed, Tested using the instructions mentioned in the description.
Note:
Android shows mirrored images for EXIF Flip, Transpose, and Transverse
while on iOS in is upright.
Test Environment
MacOS Big Sur: 11.0 Beta 5
Xcode: 12.0 Beta 5
Java Version: 1.8.0_242
Android NDK: 21.3.6528147
Node.js: 12.18.1
""NPM":"5.0.0","CLI":"8.1.0-master.11""
iphone 8 Sim (14.0 Beta)
iphone 11 (14.0 Beta 5)
Pixel XL (Android 10)
JIRA:
https://jira.appcelerator.org/browse/TIMOB-28093
Summary:
Note:
If we're not comfortable with adding these properties to the SDK, then alternatively we can add a method to our "ti.imagefactory" to fetch an image's upright dimensions instead.
Test:
DownloadImageBlobTest.js
attached to TIMOB-28093 on Android.(Note that the EXIF Flip, Transpose, and Transverse tests will appear as mirrored. Fixing the mirroring effect would require a larger refactoring of our code in the future.)