bubkoo / html-to-image

✂️ Generates an image from a DOM node using HTML5 canvas and SVG.
MIT License
5.39k stars 503 forks source link

fix: Abnormal video size #451

Open daqiude opened 5 months ago

daqiude commented 5 months ago

Description

change canvas.drawImage(video) size from clientWidth、clientHeight to videoWidth、videoHeight

Motivation and Context

To fix the problem of image deformation。for example: image

Types of changes

Self Check before Merge

vivcat[bot] commented 5 months ago

👋 @daqiude

💖 Thanks for opening this pull request! 💖

Please follow the contributing guidelines. And we use semantic commit messages to streamline the release process.

Examples of commit messages with semantic prefixes:

Things that will help get your PR across the finish line:

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (b751cbf) 62.93% compared to head (ad7092d) 63.10%. Report is 8 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #451 +/- ## ========================================== + Coverage 62.93% 63.10% +0.17% ========================================== Files 10 10 Lines 580 580 Branches 143 143 ========================================== + Hits 365 366 +1 Misses 151 151 + Partials 64 63 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.