Color keying for transparancy 
Author Message
 Color keying for transparancy

Ok, now that I can draw the sprites i need to know how to
make them with transparent backgrounds. I havbe only been
sucessful at making the transparent color a true red
(255,0,0) which is an important color in my development.  
I am wondering if there is any way to convert a rgb value
into a DDCOLORKEY for transparancy.  And also if anyone
can give me a run down process on the order of the
commands for blitting to the screen.  I have tried top set
the color key to a hexidecimal code for a color but the
color still shows.  Could i be having a problem with my
graphics colors matching the colors that are available on
the surface?   (Note: I'm using photshop 6) Do you blt the
sprite surface to the backbuffer anmd then draw that
backbuffer to the primary surface?  Can i get an
explination of what the high and low values of a color key
stand for and what are their differences if any.  Please
respond by e-mail if you can help me on any of the above
topics.


Wed, 19 May 2004 04:09:46 GMT  
 Color keying for transparancy
low and high are to be able to use a color range rather than a single color
for color keying but this is unsupported on most hardware.

The color key is not a RGB color coded value but the real value stored in
your video card memory for this particular color. You'll have to use
DDPIXELFORMAT to find out the memory layout. Check out my
www.chez.com/scribe/en/directx/ddraw_pixelformat.htm page. As explained
there magenta is really easy to use as you'll have just to add two values
found in DDPIXELFORMAT to get the correct color key value...

Patrice



Quote:
> Ok, now that I can draw the sprites i need to know how to
> make them with transparent backgrounds. I havbe only been
> sucessful at making the transparent color a true red
> (255,0,0) which is an important color in my development.
> I am wondering if there is any way to convert a rgb value
> into a DDCOLORKEY for transparancy.  And also if anyone
> can give me a run down process on the order of the
> commands for blitting to the screen.  I have tried top set
> the color key to a hexidecimal code for a color but the
> color still shows.  Could i be having a problem with my
> graphics colors matching the colors that are available on
> the surface?   (Note: I'm using photshop 6) Do you blt the
> sprite surface to the backbuffer anmd then draw that
> backbuffer to the primary surface?  Can i get an
> explination of what the high and low values of a color key
> stand for and what are their differences if any.  Please
> respond by e-mail if you can help me on any of the above
> topics.



Wed, 19 May 2004 19:07:43 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Toolbar Transparancy color

2. Transparancy on a tab control

3. form transparancy

4. Picture with transparancy

5. Help needed w/ Frame control transparancy

6. Transparancy

7. Transparancy problem

8. Transparancy of VB Controls

9. transparancy & cutoff

10. color key problem

11. MCI, AVICAP32 and Color Keys

12. @ Key Colors - Image Transparency

 

 
Powered by phpBB® Forum Software