This script allows you to remove blank tiles from images in a specified directory. It crops out any empty 32x32 pixel tiles (you can change the tile size) from the top, left, and right sides of the images.
Originally made for LimeZu assets.
BEFORE
AFTER
- Python 3.6 or above
- Clone the repository
- Navigate to the project directory
- Install Pillow with pip:
If 'python3' is not working for you, try with 'python'
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow
- Place your input images in the
input
directory. - Run the script using the command:
python3 script.py
- The cropped images will be saved in the
output
directory, maintaining the same directory structure as the input directory.
You can customize the following parameters in the script:
TILE_SIZE
: The size of each tile in pixels (default: 32)INPUT_DIR
: The input directory where the images are located (default:input
)OUTPUT_DIR
: The output directory to save the cropped images (default:output
)
Contributions are welcome! Here are a few ways you can contribute:
- Report bugs or issues
- Suggest new features or enhancements
- Submit pull requests
This project is licensed under the MIT License.