Original Post
What is the best way to create a bitmask? I have all my sprites in 1 file, and I have a alpha channel for each sprite in same file.
I figure that I could read the alpha, then convert that to bitmask, but the examples I have seen are all API specific, and I am using multiple APIs, so that is out.
The way I am trying to do it is read .tga file, then scan alpha channel where it is 8-bit color, then I try to convert that to 1 bit, but so far no luck. I need some pushing in the right direction.
(dunno what happened, this part got snipped off before)
Right now, I read 4 bytes from the alpha channel, and then shift them over to the high byte of the bitmask byte, and then OR with the next 4 bytes which would be the low order byte.
Now, after that conversion, I try to dump the data, and look at it in binary, and it doesn't look correct, so I figured I am doing something wrong.
Edited by - Clancy on January 15, 2002 4:29:33 PM