My image size is 940 * 300 but html5 canvas showing only part of image in chrome. Can you please help how to fix this?
Below is the code
The reason is simply that you cannot do
ctx.width= imgWidth; ctx.height=imgHeight;
You must do
can.width= imgWidth; can.height=imgHeight;
Where can is a reference to the canvas, and not the canvas context.
can
Working example:
http://jsfiddle.net/rbNzb/