mirror of
https://github.com/one-among-us/data.git
synced 2024-12-05 09:26:50 +08:00
7 lines
247 B
TypeScript
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, 4, 4);
|
|
} |