problem in getting image width and height
-
hi all i am trying to get the with and th hieght of an image, this my code
function readImg() { var imgTest imgTest= new Image(); imgTest.src = strImgPath intWidth = imgTest.width; intHeight = imgTest.height; }
in the first calling of this function i am getting zeros. but in a second call i got the real values. how to salve this issue ??
When you get mad...THINK twice that the only advice Tamimi - Code
-
hi all i am trying to get the with and th hieght of an image, this my code
function readImg() { var imgTest imgTest= new Image(); imgTest.src = strImgPath intWidth = imgTest.width; intHeight = imgTest.height; }
in the first calling of this function i am getting zeros. but in a second call i got the real values. how to salve this issue ??
When you get mad...THINK twice that the only advice Tamimi - Code
function readImg() { var imgTest imgTest= new Image(); imgTest.src = strImgPath imgTest.onload=function(){ intGeneralWidth = imgTest.width; intGeneralHeight = imgTest.height;} }
When you get mad...THINK twice that the only advice Tamimi - Code
-
function readImg() { var imgTest imgTest= new Image(); imgTest.src = strImgPath imgTest.onload=function(){ intGeneralWidth = imgTest.width; intGeneralHeight = imgTest.height;} }
When you get mad...THINK twice that the only advice Tamimi - Code
Good deal finding the solution :)
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon