public string PostBase64Response([FromBody] QRData data) { var ms = GenCode(data.data, data.height, data.width, data.margin); var mBytes = ms.ToArray(); return("data: image / png; base64," + Convert.ToBase64String(mBytes)); }
public async Task <IActionResult> Post([FromBody] QRData data) { var ms = GenCode(data.data, data.height, data.width, data.margin); return(File(ms, "image/png")); }