javascript - Scale a Canvas so that the base64 toDataURL() is scaled as well -


i'm building chrome extension save screenshots of webpage. i've gotten screenshot pieced html5 canvas element.

if display image canvas.todataurl('image/jpeg', 0.8); works fine.

however, if try first scale image getting context , using this:

var context = canvas.getcontext('2d'); context.scale(.75,.75); 

and output canvas.todataurl('image/jpeg', 0.8); image same size 1 without scaling. missing? how can scale image?

if want scaled down <canvas>:


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -