Created
October 20, 2015 12:53
-
-
Save haroonabbasi/01673fb9d946b3d80f32 to your computer and use it in GitHub Desktop.
Titanium: get Image Size from ImageView
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image_view.addEventListener("load",getImageSize); | |
function getImageSize(e) { | |
var blob = e.source.toBlob(); | |
if (blob === null) { | |
Ti.API.info("unable to get image size"); | |
} else { | |
Ti.API.info("id:" + e.source.id + " size=" + blob.width + "x" + blob.height); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment