I am not sure it is exactly what you had in mind, but your question reminded me of a script I tried a while back that I thought was excellent for creating dynamic photo albums.
Plogger | open source photo gallery PHP script | free image gallery script
It may feature what you need to do, which might save time. It definitely includes dynamic description fields for descriptions and you could make them show/hide on image rollover, using css in the page design such as at
Pure CSS Popups