By using DrawImage/GrabImage without a flip, I guess there could be an initialisation phase for that. There's a potential problem though in that there could be up to 25 different combinations required. If the size of the AnimImage was 512x512, that'd make 25MB just for images, rather than the 2MB or so maximum by drawing each bit.
but wouldn't you scrap the images after each match and re-use/re-build them?
I might be missing something though.
Pastepixmap might be useful. Last time I looked it didn't respect the maskcolor but you might simple be able to maskpixmap again.
I wrote some code ages ago which did a memcopy and was pretty quick on small images.
Otherwise writepixel is not a slouch either any more.
Guess you'd really have to check them all out.