Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

Calling toImage() on a view with crashes on Android. How else to you get width/height from an Image?

$
0
0

Is this expected, that toImage() on a view is not supported on Android? According to the API docs (that we all know are half-baked) I didn't see anything that would lead me to believe that you cannot. My attempts to get an image blob on a View or ImageView all end badly. After banging my head a while against this I dug into the KitchenSink app and found an eventual call to toImage guarded by a check for the iPhone platform.

On iPhone, you can create an ImageView from a file and then call toImage to get an image blob on which you can query the width and height. Is there another way? Without such, do we really have to hard-code all our image dimensions to what the anticipated native dimensions of the image are?


Viewing all articles
Browse latest Browse all 7655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>