Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // resize the imageview blob, width and height have to be explicitly set
- function getResizedBlob(_blob)
- {
- return _blob.imageAsResized(165, 100);
- }
- // create the window
- var win = Ti.UI.createWindow({
- backgroundColor : '#fff'
- });
- // create the initial imageview
- var image = Ti.UI.createImageView({
- image : 'image165.jpg',
- left : 0,
- top : 0,
- width : 165,
- height : Ti.UI.SIZE,
- backgroundColor : 'red'
- });
- // pass in the resized image into the imageview
- image.image = getResizedBlob(image.toBlob());
- win.add(image);
- win.open();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement