AndroidRotateImage
AndroidRotateImage copied to clipboard
SDK 7.0GA Support
Would you have time to update this module for the latest 7.0GA SDK support?
Please do!!!
+1
Someone update it for Ti 7+ please. @skypanther ?
Updated code. I currently don't have the environment to compile it - If anyone can generate the binaries, please send a PR 🙏🏼
Just a little snippet of code. I was able to do away with the module by accessing "uprightHeight" and then seeing if I had to do special manipulation for Android. Can't really provide full code sample as mine is quite complex, but uprightHeight and comparing to height gave me what I needed to adapt my code conditionally. Basically if uprightHeight = width then you know you have some manipulating to do.
var landscape = sourceWidth > sourceHeight;
if (Ti.Platform.osname == 'android') {
var uprightHeight = parseInt(theBlob.uprightHeight);
Ti.API.info('scaleVehicleImage Source uprightHeight:'+uprightHeight);
}
var androidPortraitOverride = false;
if ((uprightHeight == sourceWidth) && (Ti.Platform.osname == 'android') && (landscape)) {
Ti.API.info('scaleVehicleImage Android landscape override. Is actually portrait but was detected as landscape');
landscape = false;
androidPortraitOverride = true;
}