Possible to fake indexed grayscale PNG's with alpha-mask?
Posted: 2009-03-12T06:04:02-07:00
From what I've read so far, it looks like it is not possible to create 8-bit indexed grayscale PNG's with 1-bit alpha channels (e.g. http://en.wikipedia.org/wiki/Portable_N ... olor_depth). Does anyone know whether it's possible to "fake" this by either create indexed grayscale images where one pixel value (e.g. "black") is transparent? Or by specifying that one of the palette values is fully transparent?
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
-----------------------------------
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
-----------------------------------