AutoResize jpg.'s using photogallery with xml

Sorry I am new to flash. Have the xml link working with jpg’s but the files I am using are a variety of sizes and submitted from different places and cameras. Is there some way to get them to fit to the viewer dynamically.
Thanks for any help.