Canvas does the on-screen comment effect. How to traverse the profile picture into it?

requirements: traverse the passed array objects in the form of on-screen comments.
looked around on the Internet, some of them traversed text,color, but did not see canvas traversing avatars. DrawImage can only operate on img tags, right? It doesn"t seem to work either

Mar.11,2022

to answer by myself, I just contacted canvas, and searched the Internet for a long circle. The final answer is as follows:

//
var textArr = [
    {img:'img/btn_collection.png',msg:'ceshi shak bjv sjdk '},
    {img:'img/btn_complete.png',msg:'ceshi shak bjv sjdk '},
    {img:'img/btn_didnt_confirm.png',msg:'ceshi shak bjv sjdk '},
    {img:'img/btn_dingdanxiaox.png',msg:'ceshi shak bjv sjdk '},
]

take this sentence when traversing:

var img = new Image();
img.src = textArr[j].img;
ctx.drawImage(img, 0, 0, 50,50,numArrL[j]-30,numArrT[j]-40,50,50);

simple effect:

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-1e47b66-43208.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-1e47b66-43208.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?