I did a simmilar thing for a guys website I worked on, basically he wanted a simple way to update the images on a site.
I wrote a php script that reads all images from a folder, auto generates the code for the page, the clickable links and the pop up window for the full size versions. The script would check to see if there was a thumbnail of the image already, if not it automatically created a thumbnail.
Want to add an image to the gallery just drop it in the folder and all the code will auto update on the webpage including creating the new thumbnail