Adjusting Photo Frame

Hiya,

Does anyone of you flash-guru’s know how this guy pulled this off:

http://www.iso50.com/iso50.html

Just go to photography or something, and select some pictures. You’ll notice the black frame automatically adjusts to the size of the picture before the picture appears inside of the frame. How is this done?

Can anyone explain this to me? It would be greatly appreciated.