- Embedded picture page
- Sometimes you do not want html page references absolute or relative path to the picture, but you want to embed pictures into the page become one of a file, then you can picture serialized base64 format and then into HTML pages
- Embedded in the page format:
- Online you can find tool to turn pictures into base64 encoded form, or code to deal with.
- HTML5 with canvas to convert images into a page element, in fact, is converted into a base64 encoded pictures, html2canvas (document.getElementById ( 'dom_id)) then (canvas => {canvas.toDataURL ()}).;
- base64 encoded image information, will be larger than the direct image file about one-third
Pictures of front-end processing
Guess you like
Origin www.cnblogs.com/wyp1988/p/11496245.html
Recommended
Ranking