Drawing pictures and text on canvas can be displayed on canvas. After transferring pictures to canvas, an error will be reported.

draw pictures and text on canvas. Pictures and text can be displayed normally on canvas. After transferring pictures to canvas, an error will be reported

.

clipboard.png
error message

Sep.06,2021

img.onload = function() {

   ctx.drawImage();
   canvas.toDataURL('image/png'); // .
}

the picture you quote here should be cross-domain.

  1. set the crossorigin property to "anonymous" for Image images
  2. place where pictures are stored (such as oss) configure CORS, such as allow-control-allow-origin: * / li >
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-1b36994-4ec8f.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-1b36994-4ec8f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?