mirror of
https://github.com/ChrisSewell/TeamsLogoAdder.git
synced 2025-07-01 02:27:29 -04:00
master
TeamsFlipper - Image Processing Tool
TeamsFlipper is a Python script that processes images for video conferencing backgrounds by cropping, resizing, and adding logo overlays.
Features
- Batch Processing: Automatically processes all
.jpg
and.png
files in the input folder - Smart Cropping: Crops images to 16:9 aspect ratio while preserving the center content
- Standard Sizing: Resizes all images to 2560x1440 pixels for consistent output
- Logo Overlay: Adds PNG logo from the logo directory to the upper-right corner
- High Quality Output: Saves processed images as high-quality JPEGs
Installation
- Clone this repository or download the files
- Install required dependencies:
pip install -r requirements.txt
Project Structure
TeamsFlipper/
├── flip_image.py # Main processing script
├── input/ # Place your source images here
├── logo/ # Place your logo PNG file here
│ └── cornerlogo.png # Example logo file
├── output/ # Processed images appear here
├── README.md # This file
├── requirements.txt # Python dependencies
└── .gitignore # Git ignore rules
Usage
-
Prepare your files:
- Place your source images (
.jpg
or.png
) in theinput/
folder - Ensure your logo PNG file is in the
logo/
folder
- Place your source images (
-
Run the script:
python3 flip_image.py
-
Get your results:
- Processed images will be saved in the
output/
folder - Output files are named
{original_filename}_logo.jpg
- Processed images will be saved in the
Processing Pipeline
The script performs the following operations on each image:
- Crop to 16:9: Centers and crops the image to 16:9 aspect ratio
- Resize: Scales the image to exactly 2560x1440 pixels
- Logo Overlay: Places the logo (480px tall) in the exact upper-right corner
- Save: Outputs as high-quality JPEG (95% quality)
Logo Requirements
- Format: PNG with transparency support
- Sizing: Logo will be automatically resized to 480 pixels tall while maintaining aspect ratio
- Position: Logo is placed in the exact upper-right corner with no padding
Supported Input Formats
- JPEG (
.jpg
,.jpeg
) - PNG (
.png
) - Case-insensitive file extensions
Output Format
- All processed images are saved as JPEG files
- Quality: 95% (high quality)
- Naming:
{original_filename}_logo.jpg
- Size: 2560x1440 pixels (16:9 aspect ratio)
Examples
Input
my_photo.jpg
(any size/aspect ratio)- Logo:
logo/company_logo.png
Output
output/my_photo_logo.jpg
(2560x1440 with logo overlay)
Requirements
- Python 3.6+
- Pillow (PIL) library for image processing
Troubleshooting
No images found
- Ensure images are placed in the
input/
folder - Check that file extensions are
.jpg
,.jpeg
, or.png
Logo not appearing
- Verify logo file exists in the
logo/
folder - Ensure logo is in PNG format
- Check that logo file is not corrupted
Processing errors
- Ensure input images are valid image files
- Check that you have write permissions for the
output/
folder
License
This project is open source and available under standard terms.
Description
Languages
Python
100%