I require a function that takes URL as an argument to some image, and synchronously returns the resolution. I would like the function to simply hang while the image is being retrieved.
Something along those lines:
function getImageDimensions(imageData) {
$("body").append("<img id='hiddenImage' src='" + imageData />"');
/* Wait until image is loaded */
var width = $('#hiddenImage').width();
var height = $('#hiddenImage').height();
$('#hiddenImage').remove();
return width;
}