Jump to content
  • Advertisement
Sign in to follow this  
Quak

VB colorkey ?

This topic is 4957 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
VB doesn't inherently support color keying. Instead, try using a image that includes transparency in it. A GIF is a good choice.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!