Original Post
🔒 Locked
Negative image
Advertisement
Can't you just NOT each individual colour value (RGB)?
You could write some fast ASM code to do this I can imagine.
Why do you want to, couldn't you just negative the image in PSP or whatever, and have two bitmaps. (I guess not, otherwise you wouldn't ask
)
George.
"Who says computer games affect kids, imagine if PacMan affected us as kids, we'd all sit around in a darkened room munching pills and listening to repetitive music....uh oh!"
Edited by - GEo on 3/28/00 8:33:14 AM
You could write some fast ASM code to do this I can imagine.
Why do you want to, couldn't you just negative the image in PSP or whatever, and have two bitmaps. (I guess not, otherwise you wouldn't ask
George.
"Who says computer games affect kids, imagine if PacMan affected us as kids, we'd all sit around in a darkened room munching pills and listening to repetitive music....uh oh!"
Edited by - GEo on 3/28/00 8:33:14 AM
If you're using 8bit gfx, you just need to NOT the palette's contents. Otherwise a simple asm routine would do it for you, though C++ code for such a task is that simple that with the compiler's optimizations, you won't loose that much speed.
ps: i think i'd seen an asm routine that was negating an image in an example for ASM with VB at area51... That might give you a piece of code to work on.
c 'ya
Edited by - Harvester on 3/28/00 10:01:58 AM
ps: i think i'd seen an asm routine that was negating an image in an example for ASM with VB at area51... That might give you a piece of code to work on.
c 'ya
Edited by - Harvester on 3/28/00 10:01:58 AM
I wouldn''t alter the palette if you wanted to use 8-bit. That would mess up all the other colors. I would have a table that has the index of the color entry with the opposite color.
For 16, 24, and 32 bit modes, I don''t think notting the bits will work, if you want the colors to go from black - white, yellow - blue, green - red (I think this is what it is), it won''t work.
11111111 00000000 00000000 - blue
00000000 11111111 11111111 - yellow (right)
00000000 11111111 00000000 - green
11111111 00000000 11111111 - purple (close but no)
00000000 00000000 11111111 - red
11111111 11111111 00000000 - blue/green (close but no)
There are 2 theories on color. I can remember the exactly what the names are, both are correct. You have the tri-color RGB theory, that we all uses. There is also a contrast theory, where colors mask each other (red/green,
blue/yellow, black/white). Try notting the bits. If you are satisfied, go for it.
Sorry for the wordiness.
Domini
For 16, 24, and 32 bit modes, I don''t think notting the bits will work, if you want the colors to go from black - white, yellow - blue, green - red (I think this is what it is), it won''t work.
11111111 00000000 00000000 - blue
00000000 11111111 11111111 - yellow (right)
00000000 11111111 00000000 - green
11111111 00000000 11111111 - purple (close but no)
00000000 00000000 11111111 - red
11111111 11111111 00000000 - blue/green (close but no)
There are 2 theories on color. I can remember the exactly what the names are, both are correct. You have the tri-color RGB theory, that we all uses. There is also a contrast theory, where colors mask each other (red/green,
blue/yellow, black/white). Try notting the bits. If you are satisfied, go for it.
Sorry for the wordiness.
Domini
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement