bubkoo / html-to-image

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

fix: the incorrect usage of `image.decode` #401

Open u3u opened 1 year ago

u3u commented 1 year ago

Description

Incorrect usage of image.decode

Motivation and Context

https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decode

Types of changes

Self Check before Merge

vivcat[bot] commented 1 year ago

👋 @u3u

💖 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 1 year ago

Codecov Report

Patch coverage: 64.28% and no project coverage change.

Comparison is base (b751cbf) 62.93% compared to head (676b0db) 62.93%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #401 +/- ## ======================================= Coverage 62.93% 62.93% ======================================= Files 10 10 Lines 580 580 Branches 143 143 ======================================= Hits 365 365 Misses 151 151 Partials 64 64 ``` | [Impacted Files](https://app.codecov.io/gh/bubkoo/html-to-image/pull/401?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=%E5%B4%96) | Coverage Δ | | |---|---|---| | [src/clone-node.ts](https://app.codecov.io/gh/bubkoo/html-to-image/pull/401?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=%E5%B4%96#diff-c3JjL2Nsb25lLW5vZGUudHM=) | `71.42% <ø> (ø)` | | | [src/embed-images.ts](https://app.codecov.io/gh/bubkoo/html-to-image/pull/401?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=%E5%B4%96#diff-c3JjL2VtYmVkLWltYWdlcy50cw==) | `78.04% <28.57%> (ø)` | | | [src/util.ts](https://app.codecov.io/gh/bubkoo/html-to-image/pull/401?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=%E5%B4%96#diff-c3JjL3V0aWwudHM=) | `62.80% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.