Okay so I have a more advanced test to get my image processor working a bit more.
The colour RAM foreground colour replacement seems to work. However, it has a limitation where it only tries to do the replacement with the 31 most commonly used colours instead of trying to determine what those 31 colours should be by best fit (most common _reuse_). The colour RAM can only reference the first 32 colours from the palette but colour 0 is reserved for the background.
I may revisit my code and try to add the best fit feature but for now, it will do. It will probably require that I process the image in three passes instead of the two I now I have to do. As some background, the program used to do only one pass before but to get the common colour counts, I had to do another pass.
The other thing I needed to test was the tile flipping and I have inadvertently created a test for that, too. Lucky for me because I'd have to otherwise create one.
Unfortunately, the flipping isn't working. I'm not sure where the problem is right now. I don't know if I'm not writing the bits out correctly or if the VIC-IV is not working right. I'll need to check and confer with Paul.
Anyway, here is the updated disk with the two images on it. Also a screen shot:

527 tiles, 13 colours.
Enjoy!
Daniel.