Am trying to save the screenshots in base64 and embed them in the HTML file.
However I m not able to succeed with the result, all I can see is broken image in the browser (.html)
Screenshot file is working, in the log can see the base64 string but the output string is still broken,
I tested the file size which is lesser than 5kb in both PNG and JPEG format.
The following steps were used
- Screenshot image file is ready by byteArray =System.IO.File.ReadAllBytes(“Filepath”)
- Byte Array is converted to Base64 Convert.ToBase64String(byteArray)
- HTML is constructed using Base64String values -
<img src=“data:image/png;base64,”+base64String/>
- Base64String value is Mapped into the Create HTML content activity
- Using write file, the html output is saved as .html file.