Skip to content

Automatically process PNG and WEBP images with transparent backgrounds: apply hardcrop, canvas expansion, and custom padding percentages.

Notifications You must be signed in to change notification settings

ComicDansMS/paddington-resizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Paddington Resizer

This Python script allows you to automatically crop or add padding to images with a transparent background.

Dependencies

This script requires the following Python libraries:

  • Pillow (PIL)
  • tqdm

You can install these libraries using pip: pip install Pillow tqdm

Usage

  1. Clone or download the repository.
  2. Place your images in the 'source-images' folder.
  3. Edit the variables in the paddington.py script as per your requirements:
    • padding_ratio: Set padding as a percentage, for example, 20 for 20%.
    • image_ratio: Optionally set image ratio in the format (width, height) or set it to None. Example: 9/16
  4. Run the script: python paddington.py
  5. The processed images will be available in the 'output-images' folder.

About

Automatically process PNG and WEBP images with transparent backgrounds: apply hardcrop, canvas expansion, and custom padding percentages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages