FromTexture2D
Introduction
Code Example
FlatRedBall.Graphics.Texture.ImageData imageData =
FlatRedBall.Graphics.Texture.ImageData.FromTexture2D(TextureFile);
for(int x = 0; x < imageData.Width; x++)
{
for(int y = 0; y < imageData.Height; y++)
{
var pixel = imageData.GetPixelColor(x, y);
// do something with the pixel color here:
}
}Last updated
Was this helpful?