想要将图片转换为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>