Skip to content
Advertisement

Placing the the user avatar image in the right place in the welcome banner discord.py

I’m trying to place the user name and the user image in the right place in the welcome banner but I can’t mess with pixel well

the banner

this is the output:

output

JavaScript

I was trying to play a little with pixels but I couldn’t fix this right so idk what to do

Advertisement

Answer

If you use paint on windows, you are able to get the pixel coordinates. In pillow, images are loaded based on their top left value. The circle’s x, y length is Absolute value of the difference between the Top Left Hand corner, and the Bottom Right Hand Corner which means the x is 425 – 115 = 310, and the y length is 415 – 105 = 310 (perfect circle). So you should resize to 310,310. The Top Left Hand Corner’s pixel coordinate (Red X on the image) is 115,105 which is where you should paste it instead of (325, 90).

Lastly the text, which should be placed under the image (I’m assuming), all you have to do is get the co-ordinate of the bottom-left hand pixel (green X) and paste it there, which is (115, 415)

Banner

Try this

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement