Python project that automates processing mass image files to produce stickers as per WhatsApp Guidelines
Function to automate processing mass image files to produce stickers as per WhatsApp Guides. 8 px thick white border around the image fit in 512x512 square with 16 px distance from edge.
Currently supports reading png
, jpg
, jpeg
and gif
formats.
Able to write images in png
, gif
and webp
formats.
you must have these libraries installed with your python package:
os, pathlib, glob, numpy, PIL, cv2
This program has only been tested on Windows 10 & 11
with Python 3.10
place the whatsapp_sticker_maker.py
file beside your own python file and use these commands:
import whatsapp_sticker_maker
# Requirements: you must have these libraries installed with your python package
# os, pathlib, glob, numpy, PIL, cv2
whatsapp_sticker_maker.make_stickers(folder='stickers', output_folder='exports', native_format_output=False, skip_if_exists=True)
Argument | What is does | Value type | Default value | Required |
---|---|---|---|---|
folder | Folder location where all images are present. | String |
None |
Yes |
output_folder | Export folder. New folder is made if already not exists and/or provided. | String |
None |
No |
native_format_output | Export in native formats instead of webp. | Boolean |
False |
No |
skip_if_exists | Skip exporting if expected output exists. | Boolean |
False |
No |