Note that I am using Visual C# 2008 Express Edition right now.
Hey guys, right now I'm working on a level editor and my tile set bitmap is set inside a Picture Box with the name of myTileSetPic.
A problem I have encountered is that with my level editor there are tiles like trees and stuff, but my tiles that are trees have the design of a tree, and then the rest of the tile is white. This is not transparency, but it is just white. What I need to figure out how to do is to take the whiteness of the bitmap, and sort of, cancel it out I guess. I basically need to make it so you can not see the white part of the tile. I have no idea how the hell to do this, so please tell me possibly a way to do this. Thanks.
How do you make certain colors of a bitmap not show up in C#
Moderator: Coders of Rage
-
- Chaos Rift Newbie
- Posts: 9
- Joined: Tue Jan 26, 2010 10:17 pm
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: How do you make certain colors of a bitmap not show up in C#
Here you go
http://msdn.microsoft.com/en-us/library ... arent.aspx
This function sets one of the colours in the image to be displayed as transparent I believe.
http://msdn.microsoft.com/en-us/library ... arent.aspx
This function sets one of the colours in the image to be displayed as transparent I believe.
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: How do you make certain colors of a bitmap not show up in C#
Yup, just used that function about 2 hours ago in class.RyanPridgeon wrote:Here you go
http://msdn.microsoft.com/en-us/library ... arent.aspx
This function sets one of the colours in the image to be displayed as transparent I believe.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: How do you make certain colors of a bitmap not show up in C#
What's funny is I don't even have any form of C# compiler installed. I've never used GDI and I've barely touched the language, but I find this stuff by a couple of searches in google.
I'm amazed people still can't use Google or a good reference like MSDN
But still happy to help ^^
I'm amazed people still can't use Google or a good reference like MSDN
But still happy to help ^^