My goal is to get from:



8-bit Grayscale + 1-bit transparency mask + 8-bit RGB color-lookup table (The actual images I'm working with are PGM and TIF files, but I converted them to PNG's to post above)
To:

8-bit Indexed PNG with some fully transparent parts.
I added a checkerboard to make it easier to see transparent parts. The above PNG is close to what I am trying to produce-- I would like to get something that is 8-bit + a palette and or alpha mask, rather than an RGB image. The problem is that when adding the mask the image is converted from grayscale + alpha channel to an 24-bit RGB image which takes a relatively long time.
Any Ideas? Any suggestions would be greatly appreciated.
Thanks!
Keith
-----------------------------------
Edit: Added example images
-----------------------------------