Sorry for my bad English. I want programm a Isometric Game and at moment i implement a Clas for Tile-Managment.
I load a Texture with:
Irrlicht.Video.ITexture back = driver.GetTexture(strFile);
then i want to grab the Color from a Pixel in this Tile (because i want to make
a Tileset and i want determine where the Borders are from every Tile in the Set.)
I need a Function like
Irrlicht.Video.Color clrAnchor = new Color();
clrAnchor = back.GetColorFromPixel(x,y);
Is something like that possible?? Does anyone know a workaround
for this Problem??
[/url]
Grab Color from a Pixel
This is in C#, but if you are using VB.NET just make appropriate synatx changes.
myImageFileName is the path to any image format (it doesn't need to be a BMP, it can be JPG, etc.).
Code: Select all
System.Drawing.Bitmap myBitMap = new System.Drawing.Bitmap(myImageFileName);
System.Drawing.Color myPixelColor = myBitMap.GetPixel(x, y);
Irrlicht.Video.Color myIrrColor = new Irrlicht.Video.Color(myPixelColor.A, myPixelColor.R, myPixelColor.G, myPixelColor.B);