/// <summary> /// 生成名片二维码图片 /// </summary> /// <param name="Img"></param> /// <param name="Width">宽</param> /// <param name="Height">高</param> /// <returns></returns> public static string SaveVCardCodeImages(Image Img, int Width, int Height, string maxnum, string bm) { try { string guidcode = System.Guid.NewGuid().ToString(); string CardSrc = "E://二维码/生成结果/" + bm + ".png"; Image SmallPic1 = ImageProvider.DrawImageByProportion(Img, new Size(Width, Height), Color.White); SmallPic1.Save(CardSrc); return("/二维码/生成结果/" + bm + ".png"); } catch (Exception ex) { return("error"); } }