public static Image DrawOutline(Image img, GraphicsPath gp) { if (img != null && gp != null) { Bitmap bmp = new Bitmap(img); using (Graphics g = Graphics.FromImage(bmp)) { g.SmoothingMode = SmoothingMode.HighQuality; gp.WindingModeOutline(); g.DrawPath(Pens.Black, gp); } return bmp; } return null; }