Archived

This topic is now archived and is closed to further replies.

WoX

colorkeys in ddraw

Recommended Posts

just wondering, I blitted a picture in ddraw on one computer where I sat the colorkey to RGB(255,0,255) and it worked fine the comp was running under win 98 then I tested to do the same thing on a computer running under win ME and now it didn''t skip all the pixels with RGB(255,0,255) how can that be? both computers had directx 8 and that should guarantee the result to be the same independantly of what videocard you have, shouldn''t it also the pictures was different, more blurred anyone can explain what''s going on thanks

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Either ME or your program sucks...

Share this post


Link to post
Share on other sites
Well i'm gonna assume you're using 16-bit color, you have an older video card in the computer with win98 and a newer one in the one with ME. if so, then depending on how old the videom card is, it either stores colors in 16 bit or 15 bit.

it all starts from not being able to divide 16 by three.

in 15 bit each channel(red, green, and blue) has 5 bits of accuracy. One bit isn''t used.

in 16 bit the green channel gets that un used bit.

to get the color for your transparency load the bitmap into memory and the lock the surface. Get the color of the top left pixel and you have the device independent transparency color.

Edit:
After going back and reading your guestion i see that you don't even use the green channel so i really have no idea why its doing that but try the lock to see what happens and post back.



Edited by - KlePt0 on April 23, 2001 10:32:12 AM

Share this post


Link to post
Share on other sites