View unanswered posts | View active topics It is currently Sun Dec 21, 2014 1:04 am



Reply to topic  [ 2 posts ] 
 Using color key other than zero (directdraw). 
Author Message

Joined: Thu Aug 22, 2002 7:01 am
Posts: 1
Post Using color key other than zero (directdraw).
When i try to set the colorkey to a value than zero it seems like it is just ignored, or i am not just inputing the information to it in the right way.

I am running in 16 bit color mode and using 24 bit bmp files.

I tried to do it this way to ignore white.

color_key.dwColorSpaceLowValue = RGB(255,255,255);
color_key.dwColorSpaceHighValue= RGB(255,255,255);

also tried using

color_key.dwColorSpaceLowValue = RGB(0,0,0);
color_key.dwColorSpaceHighValue=RGB(255,255,255);

but the white is still there. So how would i go about to give the right instructions to colorkey on the color to ignore?


Tue Mar 16, 2004 2:30 am
Profile ICQ WWW

Joined: Fri Aug 29, 2003 7:01 am
Posts: 1
Post Using color key other than zero (directdraw).
DirectDraw color keys use the native pixel format of the surfaces on which they are used, and you are trying to use a 24 bit COLORREF value to set transparency.

If you are using white, you simply grab the pixel format of the surface, use | to combine the red, green, and blue mask, and set the colorkey from there.


Thu Mar 25, 2004 7:43 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.