Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectX ColorKeys

Started by psilocybe Jan 25, 2008 at 12:08 PM 0 replies 900+ views
Original Post
psilocybe
psilocybe
I am doing animation with directx and im having a problem with the colorkey features of the textureload.fromfile() method. im using c# and the .NET framework by the way. the problem is this, the format they want is and int type and the only way i can identify the color is through paint .net program wich gives it to me in hex and also the individual componets. (r,g,b,a). my question is two fold. can i convert a argb color or hex into and int or is there anyway to directly get the color int through a getpixel like fucntion? any help would be appreciated because i have all my artwork and i would take years to go through and manually paint the transparent areas into a color i can get to work.
Scet
Scet
Why can't you just use the hex value as the color-key?

Edit: To clarify, if Paint.Net tells you it's FFFF00FF then just use TextureLoader.FromFile( ..., 0xFFFF00FF, ... ).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.