CSharp examples for System.Drawing:Bitmap
set Data to PixelBitmapContent
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Content.Pipeline.Graphics; using System;//w w w .j a v a 2s . c o m public class Main{ public static void setData( this PixelBitmapContent<Color> self, Color[] data ) { var i = 0; for( var y = 0; y < self.Height; y++ ) { for( var x = 0; x < self.Width; x++ ) self.SetPixel( x, y, data[i++] ); } } }