[TIMOB-27524] Android: imageView toBlob() method returns null.
| GitHub Issue | n/a | 
|---|---|
| Type | Bug | 
| Priority | None | 
| Status | Resolved | 
| Resolution | Won't Do | 
| Resolution Date | 2019-11-05T17:40:49.000+0000 | 
| Affected Version/s | Release 8.2.1 | 
| Fix Version/s | n/a | 
| Components | Android | 
| Labels | n/a | 
| Reporter | Motiur Rahman | 
| Assignee | Alan Hutton | 
| Created | 2019-11-04T16:10:00.000+0000 | 
| Updated | 2019-12-02T23:06:34.000+0000 | 
Description
	*Issue:* imageview toBlob() method returns null but it should return as a blob object. It returns a proper value in iOS
Steps to Reproduce
1. Run the following sample code on an emulator or a device
2. Then check the console log.
	
var win = Titanium.UI.createWindow({
		className : 'win'
	});
	var img = Ti.UI.createImageView({
		image : 'http://ursinus.prestosports.com/sports/wbkb/2019-20/photos/KRR_48190-1.jpg?max_width=160&max_height=120',
		top : 40,
		width : 200,
		height : 200
	});
	win.add(img);
	Ti.API.info("ImgeView:", img.toBlob());
 win.open();
WARN] :   TiDrawableReference: (main) [137661,138015] Could not open stream to get bitmap
[INFO] :   ImgeView: null
[INFO] :   Choreographer: Skipped 1797 frames!  The application may be doing too much work on its main thread.
[INFO] :   APSAnalyticsStore: session.end
[INFO] :   APSAnalyticsService: Successfully sent 1 stored event(s)
You can't take a screenshot of the ImageView via toBlob() until it's been displayed on-screen. This means you have to wait for the window to open.
win.addEventListener("open", function() { Ti.API.info("ImageView:", img.toBlob()); });Closing per support comments.