Crop profile images to square format for preview

This commit is contained in:
Râu Cao 2024-10-25 18:38:26 +02:00
parent 49d5aa4487
commit f1d6ddbc84
Signed by: raucao
GPG Key ID: 37036C356E56CC51

View File

@ -13,7 +13,9 @@ function createRoundedImage(profile: Profile) {
const args = [
profile.picture,
'-resize', '256x256',
'-resize', '256x256^',
'-gravity', 'center',
'-extent', '256x256',
'(', '+clone', '-alpha', 'extract',
'-draw', "fill black polygon 0,0 0,128 128,0 fill white circle 128,128 128,0",
'(', '+clone', '-flip', ')', '-compose', 'Multiply', '-composite',