titanium mobile - how to know the weight of a image of gallery? -



titanium mobile - how to know the weight of a image of gallery? -

ti.media.openphotogallery({ success:function(event) { attch = event.media; }, cancel:function(){ console.log("error!"); } });

how can know weight of attch? , if possible, name of file in gallery.

as mentioned in documenation, method success homecoming object contain property media image/video in blob format. if want know width of image this:

ti.media.openphotogallery({ success: function(event) { var image = event.media; console.log(image.width); console.log(image.size); // image size in bytes } });

titanium-mobile appcelerator

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -