How to convert the downloaded img in a web page to base64 data

The

page cannot request a picture again after loading a picture, but the picture needs to be read out by script. When canvas changes to base64, you still need to set up the picture img.src to request the picture again, so is there any other way that this method doesn"t work

Mar.06,2021

  1. if you have already loaded once and the URI is the same when you load again, the browser should load the cache
  2. if the pictures processed in canvas have cross-domain problems, the page rendering is fine, but the output may be limited (Canvas cross-domain contamination)

img.onload=function () {canvas drawing to base64}
img.src='xxxx'


Thank you for following the situation. Some special needs can not be written js implementation has been solved through screenshot

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e588-2bc52.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e588-2bc52.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?