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
When drawing a background image with an intrinsic width of 1300 and height of 1, scaled down to a width of 650 (using background-size), the height of the image becomes 0.5, which once assigned to canvas.height, gets rounded to 0
Bug reports:
When drawing a background image with an intrinsic width of
1300
and height of1
, scaled down to a width of650
(using background-size), the height of the image becomes0.5
, which once assigned to canvas.height, gets rounded to0
html2canvas/src/render/canvas/canvas-renderer.ts
Lines 535 to 537 in 3982df1
This then triggers an error of
possible solution
Switch to use
canvas.height = Math.max(1, height);
inCanvasRenderer.resizeImage
Specifications:
The text was updated successfully, but these errors were encountered: