enhance(backend): blurhash生成時、リサイズしてからRawに変換するように (MisskeyIO#832)

This commit is contained in:
あわわわとーにゅ 2024-12-19 05:35:45 +09:00 committed by kakkokari-gtyih
parent e8bf6285cb
commit 583e4b4fa1

View file

@ -458,9 +458,9 @@ export class FileInfoService {
private getBlurhash(path: string, type: string): Promise<string> {
return new Promise(async (resolve, reject) => {
(await sharpBmp(path, type))
.raw()
.ensureAlpha()
.resize(64, 64, { fit: 'inside' })
.ensureAlpha()
.raw()
.toBuffer((err, buffer, info) => {
if (err) return reject(err);