I am making a game that loads canvas first, then load all the images, but I am having problem with the opacity of each image, when I try to use "img.style.opacity = 0.5;" nothing changes in the image... This is a part of code:
imageObj.src = "table.jpg";
var tequila = new Image();
tequila.src = "tequila.png";
tequila.style.opacity = 0.5;
wisky.onload = function(){
context.drawImage(tequila, 180, 319);
};
}