Image: Return the size with actionscript?

Is there any way actionscript can determine the size of an image (in pixels)?
I am making a gallery and i want the thumbnails to align correct, as some of the thumbnails differ in width…
I want to make a method (function) which takes an image (reference) and returns its width.
Cheers,
Dave