Monday, January 27, 2014

Get all pixels in circular image

You just need to know if a point x, y is in the circle or not, see below:



GraphicsPath path = new GraphicsPath();
path.AddEllipse(0, 0, 100, 100);
Region region = new Region(path);
if (region.IsVisible(10, 10))
{
//point 10, 10 is in the circular image
//Bitmap.Getpixel(10,10).
}


No comments:

Post a Comment