chore: Add types to the DITHERING_ALGORITHMS values
This commit is contained in:
parent
1d24bde610
commit
b798a7062a
1 changed files with 4 additions and 4 deletions
|
|
@ -4,10 +4,10 @@
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
|
|
||||||
const DITHERING_ALGORITHMS = {
|
const DITHERING_ALGORITHMS = {
|
||||||
atkinson: (imageData) => Dither.atkinson(imageData),
|
atkinson: (imageData: ImageData) => Dither.atkinson(imageData),
|
||||||
bayer: (imageData) => Dither.bayer(imageData, 170),
|
bayer: (imageData: ImageData) => Dither.bayer(imageData, 170),
|
||||||
floydSteinberg: (imageData) => Dither.floydsteinberg(imageData),
|
floydSteinberg: (imageData: ImageData) => Dither.floydsteinberg(imageData),
|
||||||
threshold: (imageData) => Dither.threshold(imageData, 2),
|
threshold: (imageData: ImageData) => Dither.threshold(imageData, 2),
|
||||||
}
|
}
|
||||||
|
|
||||||
let canvas: HTMLCanvasElement;
|
let canvas: HTMLCanvasElement;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue