Commit 40d94ae
fix: lanczos throwing when destination dimensions are not round (#50)
* fix: lanczos throwing when destination dimensions are not round
Images over `MAX_WIDTH` that don't scale to a rounded width or height
were causing lanczos to blow up with `RangeError: byte length of Uint32Array should be a multiple of 4`
This change ensures that the target dimensions are rounded and the resulting target `Uint32Array`
has a length that is a multiple of 4
* chore: add changeset
---------
Co-authored-by: Jack Works <[email protected]>1 parent f27b915 commit 40d94ae
File tree
3 files changed
+29
-1
lines changed- .changeset
- src/utils
- tests
3 files changed
+29
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments