I need convert image to Data URL (embedding Image) in the Win-application for HTML and I need Data URL (embedding Image) to image.
public static string GetDataURL(string imgFile) { return "<img src="data:image/" + Path.GetExtension(imgFile).Replace(".","") + ";base64," + Convert.ToBase64String(File.ReadAllBytes(imgFile)) + "" />"; }
1.4m articles
1.4m replys
5 comments
57.0k users