mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-23 00:29:22 +09:00
enhance(backend): blurhash生成時、リサイズしてからRawに変換するように (MisskeyIO#832)
This commit is contained in:
parent
e8bf6285cb
commit
583e4b4fa1
@ -458,9 +458,9 @@ export class FileInfoService {
|
|||||||
private getBlurhash(path: string, type: string): Promise<string> {
|
private getBlurhash(path: string, type: string): Promise<string> {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
(await sharpBmp(path, type))
|
(await sharpBmp(path, type))
|
||||||
.raw()
|
|
||||||
.ensureAlpha()
|
|
||||||
.resize(64, 64, { fit: 'inside' })
|
.resize(64, 64, { fit: 'inside' })
|
||||||
|
.ensureAlpha()
|
||||||
|
.raw()
|
||||||
.toBuffer((err, buffer, info) => {
|
.toBuffer((err, buffer, info) => {
|
||||||
if (err) return reject(err);
|
if (err) return reject(err);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user