在HTML(C#)中将图像转换为base64

时间:2016-09-08 13:02:46

标签: c# html base64

想要将图片转换为base64。

如果我从HTML中找到了img标签,那么img标签将转换为base64。

  

INPUT:HTML with img with PATH

     

OUTPUT:带有base64图像的HTML

HTML:

<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="author" content="" />
    </head>
    <body>
        <div>
            <span style="font-family:Calibri;font-size:11pt;">Test my Test my Test my Test my Test my Test my </span>
            <span style="font-family:Calibri;font-size:11pt;font-style: italic;">Test</span>
            <span><img src="Document_files/Image2.png" alt="\Desktop\javascript (1).png" width="160" height="96" border="0" /></span>
            <span><img src="Document_files/Image3.jpeg" width="173" height="103" border="0" /></span></p>
            <span style="font-family:Calibri;font-size:11pt;"> my Test my Test my </span>
        </div>
    </body>
</html>

0 个答案:

没有答案