I'm using the red/green/blue channels of an image to create a custom mask for a game. The red & green channels are going to be gradient images, and the blue channel is going to have single-pixel markers on it:
The blue pixels in that image are blown up to more than one pixel so that they're visible, and hopefully that conveys my meaning. The red channel is used to mask a character, the green channel is used to mask some items, the blue channel (the little dots you see) is used to signify markers. Each blue pixel will actually be slightly different (255, 254, 253, 252, etc). The problem is that since the red and green channels are full gradients, any data on the blue channel, when saved off as an 8bit png, gets completely drowned out and those pixels just vanish (since the color table assigns all 256 colors to red and green colors). So I'm trying to figure out if it's possible to put a hard preservation on the blue channel, basically saying "Keep the blue value exact, no matter what". This isn't important on the other channels since they're going to get converted to alpha masks anyway, so a couple pixels off in one direction or the other doesn't matter.
And ideas? It'd be nice if there's some way to get IM to do this for me, but my fallback is to hopefully figure out how to manually define the entire 256-color palette that's used when saving off an 8-bit png. I'd basically read in the pixels for the whole image and write my own table, making sure to preserve the blue channel no matter what.