Transparent In DirectDraw 7

Alex
04-18-2002, 02:04 PM
How to make the picture become transparent in DirectDraw?

I have a picture will Green(RGB:0,255,0) background but while i set the low and high of DDCOLORKEY to "&H7E0", the picture is become transparent but it leave a green border around the character of the picture?

Original Picture
http://www.angelfire.com/super2/alexfung/images/Original.JPG

After Transparent
http://www.angelfire.com/super2/alexfung/images/After.JPG

Have i do something wrong of the value of DDCOLORKEY?

Can any one tell me how to set the value correctly?

Thanks a lot!

Squirm
04-18-2002, 03:57 PM
The reason is that the pixels around your image are not of the colour specified. If you magnify it you'll see it like the picture below.

Change these pixels to the correct colour and you'll be set. :D

Alex
04-18-2002, 04:09 PM
But why the DDCOLORKEY of green is "&H7E0" not "&H00FF00"? (I just copy from book thus i don't why is "&H7E0").

Could you tell me how to convert green to "&H7E0"?

Thanks a lot

Squirm
04-18-2002, 04:54 PM
&H7E0 is red, not green. :-\

Alex
04-19-2002, 09:59 AM
But if I set to &H7E0, the green become transparent, just leave the green outline

Squirm
04-19-2002, 10:03 AM
Like I said, you need to make all the pixels that are different shades of green into the correct shade.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum