XML Gallery with Thumbnail masks

Hello everyone, this is my first post so apologies if I’ve popped up in the wrong spot. I tried to make sure I was in the right area, but there’s only so much digging I can do at work before it looks suspicious.

I have a problem I can’t seem to find an answer to anywhere on the site, in the forum, or on the web.

I’ve been cobbling together a gallery system from the (admittedly wonderful) tuts on XML galleries and the thumbnail mod. Now, I split the thumbnails out of the scroller from that and put them into an auto-aligning grid, that was easy enough. What I’m having problems with is figuring out how to add masks and preloaders to each thumbnail as it is generated.

The site I’m designing this for has a lot of pictures, and right now the thumbs tend to just spring up wholly formed, but that means there’s an awkward moment of loading when the viewer may not know what’s happening. I’m after a solution like SimpleViewer uses, but have no idea how to go about it.

The mask issue is because I’d like to have each thumbnail strip itself to a square (or, possibly even a circle) no matter the aspect ration of the thumbnail (I know the size of the shortest side is a constant, so jockeying the mask into place oughtta be easy enough, if I could just get one to exist at all…)

Anyway, and help I can get would be much appreciated, and thanks for the time it took to read this.