Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

get color of pixel c#

static Color GetPixel(Point position)
{
	using (var bitmap = new Bitmap(1, 1))
	{
        using (var graphics = Graphics.FromImage(bitmap))
        {
            graphics.CopyFromScreen(position, new Point(0, 0), new Size(1, 1));
        }
    	return bitmap.GetPixel(0, 0);
	}
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #color #pixel
ADD COMMENT
Topic
Name
2+1 =