Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2485] [android]when creating a blob from an image, width and height are not set

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2012-11-06T21:51:35.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, imageview
ReporterMartin Guillon
AssigneeDavide Cassenti
Created2012-08-25T11:17:17.000+0000
Updated2016-03-08T07:41:32.000+0000

Description

test case says it all
var win = Ti.UI.createWindow({
    backgroundColor: 'white'
});
 
var fileName = "http://3.bp.blogspot.com/_Z-tqVTd9fPI/TRzjXBKIKvI/AAAAAAAACEo/wflE9APHFWE/s200/steve_jobs.jpg";
var xhr = Titanium.Network.createHTTPClient();
  
image = Ti.UI.createImageView({
    width:400,
    backgroundColor:'blue',
    // image:fileName,
    height:200
});
 
win.add(image);
 
xhr.onload = function() {
    var imgBlob = this.responseData;
    Ti.API.info("image size " + imgBlob.width + "," + imgBlob.height);
};
xhr.open('GET', fileName);
 
win.open();
 
xhr.send();

Comments

  1. Federico Casali 2012-11-06

JSON Source