mirror of
https://github.com/ChrisSewell/TeamsLogoAdder.git
synced 2025-07-01 18:47:28 -04:00
Initial commit
This commit is contained in:
109
README.md
Normal file
109
README.md
Normal file
@ -0,0 +1,109 @@
|
||||
# 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
|
||||
|
||||
1. Clone this repository or download the files
|
||||
2. Install required dependencies:
|
||||
```bash
|
||||
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
|
||||
|
||||
1. **Prepare your files:**
|
||||
- Place your source images (`.jpg` or `.png`) in the `input/` folder
|
||||
- Ensure your logo PNG file is in the `logo/` folder
|
||||
|
||||
2. **Run the script:**
|
||||
```bash
|
||||
python3 flip_image.py
|
||||
```
|
||||
|
||||
3. **Get your results:**
|
||||
- Processed images will be saved in the `output/` folder
|
||||
- Output files are named `{original_filename}_logo.jpg`
|
||||
|
||||
## Processing Pipeline
|
||||
|
||||
The script performs the following operations on each image:
|
||||
|
||||
1. **Crop to 16:9**: Centers and crops the image to 16:9 aspect ratio
|
||||
2. **Resize**: Scales the image to exactly 2560x1440 pixels
|
||||
3. **Logo Overlay**: Places the logo (480px tall) in the exact upper-right corner
|
||||
4. **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.
|
Reference in New Issue
Block a user