1function getMeta(url, callback) {
2 var img = new Image();
3 img.src = url;
4 img.onload = function() { callback(this.width, this.height); }
5}
6getMeta(
7 "http://snook.ca/files/mootools_83_snookca.png",
8 function(width, height) { alert(width + 'px ' + height + 'px') }
9);