34
rated 0 times
[
40]
[
6]
/ answers: 1 / hits: 75738
/ 11 Years ago, sun, march 3, 2013, 12:00:00
I have an image which is 1836 x 3264 I want to drawImage()
to canvas and resize to 739 x 1162.
After reading the documentation I thought this could be accomplished with the following:
ctx.drawImage(image, 0, 0, 739, 1162);
I have also tried:
ctx.drawImage(image, 0, 0, 1836, 3264, 0, 0, 739, 1162);
Both show only a small part of the full image instead of shrinking it down.
How do I pass through the values to resize from 1836 x 3264 -> 739 x 1162 ?
More From » html5-canvas