A script to generate a profile picture and a banner that show the same image on Discord

A script to generate a profile picture and a banner that show the same image on Discord.

Installation / Update

pip install --upgrade git+https://github.com/victorbnl/discord-pfp-banner-generator.git

And make sure your python scripts directory[1] is in your path (pip should warn you if it’s not anyway).

Without pip

Clone this repo, install the dependencies with pip install -r requirements.txt, and run the following commands in the repo directory, replacing the command discord_pfp_banner_generator of the usage section by python3 discord_pfp_banner_generator.

Usage

Cli

discord_pfp_banner_generator image.(png|jpg|anything)

Both banner.png and profile-picture.png are now written in the current directory!

Module

import discord_pfp_banner_generator im = Image.load(“image.(png|jpg|anything)”) banner, pfp = discord_pfp_banner_generator.process(im) banner.save(“banner.png”, “PNG”) pfp.save(“pfp.png”, “PNG”)

  1. To get your python script paths, run python3 -c "print(__import__('sysconfig').get_path('scripts', __import__('os').name+'_user'))" (replace python3 by py on Windows)

 

 

 

To finish reading, please visit source site