Ejemplo n.º 1
0
 /// <summary>叠加绘制图标</summary>
 public static Image DrawIcon(this Image img, string iconUrl)
 {
     if (iconUrl.IsNotEmpty())
     {
         var icon = HttpHelper.GetNetworkImage(iconUrl);
         int s    = img.Width / 5;
         icon = Painter.Thumbnail(icon, s, s);
         var point = new Point((img.Width - s) / 2, (img.Height - s) / 2);
         img = Painter.Merge(img, (Bitmap)icon, 0.95f, point);
         icon.Dispose();
     }
     return(img);
 }