width of original image
quick question.
I am trying to find the width and height of the stored image on the server
so I can load this into a jcrop feature.
The image shown on the page is resizable so does not represent the propper
size of the original image, so whne I try to jcrop it, the co-oredinates
are wrong
Is there any way to find the original height and width using jquery or
javascript.
UPDATE
I have made a jsfiddle of something I need that doesnt work, can anyone
see why it doesnt work http://jsfiddle.net/2C2Eu/2/
code
function getimagesize(img) {
img.onload = function () {
alert(this.width + 'x' + this.height);
};
}
var image = "http://www.citizenship-aei.org/wp-content/uploads/Testing.jpg";
getimagesize(image);
No comments:
Post a Comment