SetPixel() public method

Set the color of the specified pixel
public SetPixel ( int x, int y, Color color ) : void
x int
y int
color Color
return void
コード例 #1
0
ファイル: GifDecoder.cs プロジェクト: dbremner/ScreenToGif
        private void SetPixels(int[] pixels)
        {
            var image = new PixelUtil(_bitmap);
            image.LockBits();

            int count = 0;
            for (int th = 0; th < _image.Height; th++)
            {
                for (int tw = 0; tw < _image.Width; tw++)
                {
                    Color color = Color.FromArgb(pixels[count++]);
                    image.SetPixel(tw, th, color);
                }
            }

            image.UnlockBits();
        }