better thumbnails lul

This commit is contained in:
Flummi 2022-01-03 17:06:47 +01:00
parent 1995cdaacf
commit b742eba1cc

View File

@ -145,7 +145,7 @@ export default async bot => {
thumb_orig = `./tmp/${insertq}.png`;
}
}
await exec(`convert "${thumb_orig}" -resize "200x200^" -gravity center -crop 128x128+0+0 +repage ./public/t/${insertq}.png`);
await exec(`convert "${thumb_orig}" -resize "128x128^" -gravity center -crop 128x128+0+0 +repage ./public/t/${insertq}.png`);
await fs.promises.unlink(`./tmp/${insertq}`).catch(_=>{});
} catch(err) {
e.reply("\x033>no thumb lol");