Formatting is as a easy as editing the HTML in Thumbnailviewer.ascx (in each skin)
To add captions, you will need to add your caption literal/hyperlink/label control, then then edit the controls code a bit.
I did this same thing on my own site the other day (see http://scottwater.com/blog/galleries/1065.aspx):
protected void ImageCreated(object sender, RepeaterItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Dottext.Framework.Components.Image _image = (Dottext.Framework.Components.Image)e.Item.DataItem;
if(_image != null)
{
HyperLink ThumbNailImage = (HyperLink)e.Item.FindControl("ThumbNailImage");
if(ThumbNailImage != null)
{
ThumbNailImage.ImageUrl = _baseImagePath + _image.ThumbNailFile;
ThumbNailImage.NavigateUrl = CurrentBlog.UrlFormats.ImageUrl(_image.CategoryID.ToString(),_image.ImageID);
ThumbNailImage.ToolTip = _image.Title;
}
HyperLink titleLink = (HyperLink)e.Item.FindControl("ImageTitle");
titleLink.Text = _image.Title;
titleLink.NavigateUrl = ThumbNailImage.NavigateUrl;
}
}
}