Skip to content

ooodnakov/StickerCreator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sticker Creator.

Creats suitable round images for stickers in TG.

My friend asked me to crop some images for him. At first I was doing it manually. But he saw my struggle and proposed to Python it. And it is my result.

Pre-Requirements.

  1. Any basic Python IDE or Shell.
  2. Not being dumb-ass.
  3. Love dots.

Manual.

  1. Put your images in input folder.
  2. Run imager.py.
  3. Proceed in terminal.
We detected such images to crop:
name#1
name#2
...
Do you want to proceed(Y,N)?
Do you want to keep original names (Y/N)?
  1. Get your stickers in output folder.
name#1  is done.
name#2  is done.
...
  1. You are brilliant! You are able to find your pngs in output folder.

How does it actually works?

You can just look to source code or read further:

  1. Make a list of image names in input folder.
  2. After that we iterate through each name in a list
    1. Opening an Image.
    2. Cropping it to square which is centered.
    3. Resizing image to 512x512.
    4. Creating a round mask of suitable size.
    5. Putting alpha mask.
    6. Saving image with according filename.
  3. Putting my sticker in output folder so that everyone knows who done this amazing sticker pack!

About

Creats suitable images for stickers in TG.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages