Define profile picture size and positions in default.py to improve layout consistency and enhance image composition for user profiles.
Some checks are pending
Run pre-commit / Run pre-commit (push) Waiting to run
Some checks are pending
Run pre-commit / Run pre-commit (push) Waiting to run
This commit is contained in:
parent
d335fc3d49
commit
2e402ff7cf
1 changed files with 7 additions and 1 deletions
|
@ -199,6 +199,13 @@ def generate_default_profile(
|
||||||
# Slightly increase height to accommodate larger fonts
|
# Slightly increase height to accommodate larger fonts
|
||||||
desired_card_size = (1050, 320)
|
desired_card_size = (1050, 320)
|
||||||
|
|
||||||
|
# Define profile picture size and positions
|
||||||
|
pfp_size = (270, 270) # Slightly smaller profile picture
|
||||||
|
pfp_x = 55
|
||||||
|
pfp_y = (desired_card_size[1] - pfp_size[1]) // 2
|
||||||
|
circle_x = pfp_x
|
||||||
|
circle_y = pfp_y
|
||||||
|
|
||||||
# Define the stats area with a modern glass effect
|
# Define the stats area with a modern glass effect
|
||||||
stats_area = (
|
stats_area = (
|
||||||
380, # x1 - Start after profile picture
|
380, # x1 - Start after profile picture
|
||||||
|
@ -391,7 +398,6 @@ def generate_default_profile(
|
||||||
card = imgtools.round_image_corners(card, 20)
|
card = imgtools.round_image_corners(card, 20)
|
||||||
|
|
||||||
# Create circular profile picture
|
# Create circular profile picture
|
||||||
pfp_size = (270, 270) # Slightly smaller profile picture
|
|
||||||
pfp = pfp.resize(pfp_size, Image.Resampling.LANCZOS)
|
pfp = pfp.resize(pfp_size, Image.Resampling.LANCZOS)
|
||||||
pfp = imgtools.make_profile_circle(pfp)
|
pfp = imgtools.make_profile_circle(pfp)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue