What is image selection?
stampAnnot.setImageData(imageSelection, keepAsSVG);
And you should uncomment that line?
stampAnnot.ImageData = document.getElementById("myCanvas").toDataURL();
What is image selection?
stampAnnot.setImageData(imageSelection, keepAsSVG);
And you should uncomment that line?
stampAnnot.ImageData = document.getElementById("myCanvas").toDataURL();