/// <summary> /// API接收Base64转图片 /// </summary> /// <param name="Img">图片字节</param> /// <param name="Path">储存地址</param> /// <returns></returns> public IHttpActionResult Index(String Img, String Path) { //转图片 byte[] bit = Convert.FromBase64String(Img); MemoryStream ms = new MemoryStream(bit); Bitmap bmp = new Bitmap(ms); bmp.Save(HttpContext.Current.Server.MapPath(Path) + ".jpg", ImageFormat.Jpeg); return Ok(); }
c# API接收Base64转图片
猜你喜欢
转载自www.cnblogs.com/yuanzijian-ruiec/p/9362601.html
今日推荐
周排行