Better random avatars quality.

This commit is contained in:
John Livingston 2022-01-07 11:29:20 +01:00
parent 377c842c23
commit 1e27debb7d
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,11 @@
# Changelog
## ???
### Minor changes and fixes
* Builtin Prosody: better random avatars quality.
## 5.3.0
### Features

View File

@ -28,6 +28,6 @@ for (let i = 1; i <= count; i++) {
for (let j = 0; j < backgrounds.length; j++) {
const out = i + (count * j)
const background = backgrounds[j]
sharp(inputFile).flatten({background}).resize(120, 120).jpeg().toFile(path.join(outputDir, out.toString() + '.jpg'))
sharp(inputFile).flatten({background}).resize(120, 120).jpeg({quality: 95, mozjpeg: true}).toFile(path.join(outputDir, out.toString() + '.jpg'))
}
}