When a Titanium Blob wraps an image, its "width" and "height" properties provide the "decoded" image's dimensions. Unfortunately, Android's native image loading APIs ignore a JPEG's EXIF orientation, meaning the image is loaded as-is (no rotation applied). While our ImageView and other APIs will correctly handle the EXIF orientation, the blob's "width" and "height" is for the unrotated image which makes it difficult to do manual layouts (ex: calculate letterbox scaling).
Add the following properties to Titanium Blob:
The above properties will return what the image width and height should be when a JPEG's EXIF orientation is applied onscreen. If the image is not a JPEG or the JPEG has no EXIF orientation, then these properties will return the same values as "width" and "height".
And since iOS loads images in the upright positions, the above properties will always return the same values as "width" and "height".
Developers need the image's actual width and height to do things like letterbox scaling. For example...
If the JPEG is loaded sideways (ie: its EXIF orientation is ignored), then the above will scale the image wrong.
This is an interim solution. A better solution would be to completely refactor Titanium's image loading code and decode the image in the upright position (pre-rotated). This will be a huge undertaking that is best done in a major Titanium release version. But when we do this, Android's "uprightWidth" and "uprightHeight" properties will match "width" and "height" just like iOS.