diff --git a/built/index.js b/built/index.js index 31414fb..9d0905d 100644 --- a/built/index.js +++ b/built/index.js @@ -130,7 +130,8 @@ async function proxyHandler(request, reply) { else if ('badge' in request.query) { const mask = (await sharpBmp(file.path, file.mime)) .resize(96, 96, { - fit: 'inside', + fit: 'contain', + position: 'centre', withoutEnlargement: false, }) .greyscale() diff --git a/package.json b/package.json index 71dcc82..e9b5f30 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey-media-proxy", - "version": "0.0.20", + "version": "0.0.21", "description": "The Media Proxy for Misskey", "main": "built/index.js", "packageManager": "pnpm@7.28.0", diff --git a/src/index.ts b/src/index.ts index 265fbc0..2e360bf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -174,7 +174,8 @@ async function proxyHandler(request: FastifyRequest<{ Params: { url: string; }; } else if ('badge' in request.query) { const mask = (await sharpBmp(file.path, file.mime)) .resize(96, 96, { - fit: 'inside', + fit: 'contain', + position: 'centre', withoutEnlargement: false, }) .greyscale()