public IEnumerable<int> GetRawPixelValues()
{
if (PixelData == null)
yield break;
Rectangle bounds = GetBoundingBoxRounded(true);
for (int x = bounds.Left; x <= bounds.Right; x++)
{
for (int y = bounds.Top; y <= bounds.Bottom; y++)
{
PointF p = new PointF(x, y);
if (Contains(p))
yield return PixelData.GetPixel(x, y);
}
}
}