i'm created an html5 canvas program that copying a image into canvas object. that change transparent background image color to blue color. that program correctly run on Firefox and Chrome. but i want to run that program an Internet Explorer 8.
Program :
<body>
<img id="my_img" src="https://cdn0.iconfinder.com/data/icons/classic-cars-by-cemagraphics/512/red_512.png" alt="The Image">
<canvas id="myCanvas" style="border:3px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
<script>
document.getElementById("my_img").onload = function() {
var img = document.getElementById("my_img");
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
c.width=img.width;
c.height=img.height;
ctx.rect(0,0,c.width,c.height);
ctx.fillStyle="blue";
ctx.fill();
ctx.drawImage(img, 0, 0);
};
</script>
</body>