Lorsque je tente de charger une image dans mon application noeud webkit avec le code suivant:Images à toile dans Rendus Noeud Webkit sont Blurry
var canvas = document.getElementById('cytoBkg');
var ctx = canvas.getContext('2d');
ctx.imageSmoothingEnabled = false;
var map = new Image();
map.src = './maps/map.jpg';
map.onload = function() {
ctx.drawImage(map, 0, 0, map.width, map.height, 0, 0, canvas.width, canvas.height);
console.log(map.width, map.height);
}
l'image qui est rendu à la toile est très floue. Après environ une minute, l'erreur suivante apparaît dans la console:
[7583:7583:0519/153517.738479:ERROR:CONSOLE(0)] "Denying load of chrome-extension://dekacdafkimiiblogellomljhcemdaab/maps/map.jpg. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.", source: chrome-devtools://devtools/bundled/inspector.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/@691bdb490962d4e6ae7f25c6ab1fdd0faaf19cd0/&dockSide=undocked (0)
Comment puis-je charger mon image correctement? J'ai essayé d'ajouter l'image en tant que ressource accessible sur le Web dans mon fichier package.json, mais cela n'a pas aidé.