Crop profile images to square format for preview
This commit is contained in:
parent
49d5aa4487
commit
f1d6ddbc84
@ -13,7 +13,9 @@ function createRoundedImage(profile: Profile) {
|
|||||||
|
|
||||||
const args = [
|
const args = [
|
||||||
profile.picture,
|
profile.picture,
|
||||||
'-resize', '256x256',
|
'-resize', '256x256^',
|
||||||
|
'-gravity', 'center',
|
||||||
|
'-extent', '256x256',
|
||||||
'(', '+clone', '-alpha', 'extract',
|
'(', '+clone', '-alpha', 'extract',
|
||||||
'-draw', "fill black polygon 0,0 0,128 128,0 fill white circle 128,128 128,0",
|
'-draw', "fill black polygon 0,0 0,128 128,0 fill white circle 128,128 128,0",
|
||||||
'(', '+clone', '-flip', ')', '-compose', 'Multiply', '-composite',
|
'(', '+clone', '-flip', ')', '-compose', 'Multiply', '-composite',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user