1
0
mirror of https://github.com/one-among-us/data.git synced 2024-11-27 05:26:49 +08:00
one-among-us-data/scripts/blurhash.ts

7 lines
247 B
TypeScript
Raw Normal View History

2024-11-17 23:27:16 +08:00
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, 4, 4);
}