Archived

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

Aram

DDSetColorKey

Recommended Posts

Aram    122
Sorry to bother yuo all with this question but I have a small problem with DDSetColorKey. I have set the trasparent color to RGB(0,0,0) for an image but the black box around the image still shows up. Anyone know what the problem could be?

Share this post


Link to post
Share on other sites
pink_daisy    200
Are you checking that your call to SetColorKey succeeds? That would be my first suggestion. If that works, then i would check that the "black" on your image is actually (0,0,0) and not, say, (10,10,10) or something else. There is a wide color range that will appear black on most monitors even when it''s not (0,0,0).

~don

"They that can give up essential liberty to obtain temporary safety deserve neither liberty nor safety."
- Benjamin Franklin

Share this post


Link to post
Share on other sites
Aram    122
Yeah I have checked them both and it still doesnt work... =(
I''m using 24-bits bmp file.
Do I then have to use something else than just RGB(0,0,0)?

Share this post


Link to post
Share on other sites
BitBlt    386
Have you set the colors to be transparent?


DDCOLORKEY key;

/**************\
key.dwColorSpaceLowValue = RGB(0,0,0);
key.dwColorSpaceHighValue = RGB(0,0,0);
/**************\

lpDDSbmp->SetColorKey(DDCKEY_SRCBLT, &key);
// lpDDSbmp is the surface that the sprite is on





Make games, it''s fun

Share this post


Link to post
Share on other sites
Aram    122
I tryed your code but it still seem''s not to work. =(
My other sprites works just fine but this..
I think I''ll try making a new image. That maybe will help, cause
you can never be to sure.

By the way thanks for the reply''s. =) My first post here...


Share this post


Link to post
Share on other sites