How to get width of a loaded image

i am creating a image gallery in which i want to have different width of images (height is same) as thumbs, i am not able to get the width (i can only get the even width of s[ecofoed) of the image to make a scroller. how do i get the width of images that i am loading images thru xml.