You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to resize a Image? In the browser I can change a ImageElement like the following code. However in node it wont change the size and the image and therefore the canvas still have the original size of 500x375 (in my case).
See #848 -- this is missing from node-canavs. img.height= does nothing (unless you're using SVG with v2.x, IIRC). However, drawImage() does work to scale images; you'll just need to figure out the scaling factor to use instead of being able to set the width/height in pixels.
(Also, you should put the code that depends on the img into an img.onload handler. Right now img.src= is synchronous, but it's not supposed to be and will hopefully become async in the future.)
Issue or Feature
Is it possible to resize a Image? In the browser I can change a ImageElement like the following code. However in node it wont change the size and the image and therefore the canvas still have the original size of 500x375 (in my case).
Steps to Reproduce
Your Environment
The text was updated successfully, but these errors were encountered: