1
0
mirror of https://github.com/one-among-us/data.git synced 2025-01-09 18:42:21 +08:00
one-among-us-data/scripts/blurhash.ts
2025-01-02 15:16:19 +08:00

7 lines
247 B
TypeScript

import { encode } from "blurhash";
import { getSync } from '@andreekeberg/imagedata';
export async function encodeBlur(path: string): Promise<string> {
const data = getSync(path);
return encode(data.data, data.width, data.height, 2, 2);
}