Sign in to follow this  
Quak

VB colorkey ?

Recommended Posts

Hi, I want to display a bitmap on a form (in VB) and "make" a certain color of the bitmap invisible (like colorkeys in dx). Does anyone know how I could do it ? thx :) Quak

Share this post


Link to post
Share on other sites
it does support color keying. i remember doint it when i made a game. you are going to have to create masks (a black and white image of the sprite) and blit both of them. look into the Paint function, there should be something about it, or look into bitblt. i know htere are protocols for things like vbSrcCopy and things like that to do transparent blits, look it up on google.

Share this post


Link to post
Share on other sites
Quote:
Original post by xSKOTTIEx
it does support color keying. i remember doint it when i made a game. you are going to have to create masks (a black and white image of the sprite) and blit both of them. look into the Paint function, there should be something about it, or look into bitblt. i know htere are protocols for things like vbSrcCopy and things like that to do transparent blits, look it up on google.

That's not colorkeying, that's masking. Color keying is when you specify a color and any pixel of that color is ignored during the blitting process. Masking is totally a different process.

To OP, VB doesn't support color keying. Use masking to achieve the same effect.

Share this post


Link to post
Share on other sites
i rember once seeing a artcle on planet source code on how to creae a color key blitter. Which is possible. But i forgot where the link is. Of course using DX color key is probablly easier and faster because its optimized code. and is this Vb or vb.net. You can use transparecny in .net "nativly"

- Mike

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this