https://github.com/andrepradika/combiner-image
ποΈ Image Combiner is a Python script that merges two images into a single composite image. It reads a CSV file containing fabric and sofa image filenames, processes them in batch, and saves the final images with a timestamped filename. Perfect for visualizing fabric samples on furniture! π¨β¨
https://github.com/andrepradika/combiner-image
automation csv-processing image-manipulation
Last synced: 2 months ago
JSON representation
ποΈ Image Combiner is a Python script that merges two images into a single composite image. It reads a CSV file containing fabric and sofa image filenames, processes them in batch, and saves the final images with a timestamped filename. Perfect for visualizing fabric samples on furniture! π¨β¨
- Host: GitHub
- URL: https://github.com/andrepradika/combiner-image
- Owner: andrepradika
- Created: 2025-03-13T01:09:15.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-03-13T01:10:57.000Z (2 months ago)
- Last Synced: 2025-03-13T02:22:35.677Z (2 months ago)
- Topics: automation, csv-processing, image-manipulation
- Language: Python
- Homepage:
- Size: 291 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ποΈ Image Combiner
## π About
**Image Combiner** πΌοΈπ is a Python script that merges two imagesβone representing **fabric** and the other a **sofa**βinto a single **500x500px composite image**. The script reads a CSV file containing filenames, processes each pair of images, and saves the combined results with a **timestamped filename**.
## π Features
β **Batch Processing** β Reads image filenames from a CSV file and processes multiple pairs at once.
β **Automated Image Merging** β Stacks fabric (bottom) and sofa (top) into a new composite image.
β **Timestamped Filenames** β Ensures unique output filenames using the current timestamp.
β **CSV File Update** β Updates the CSV file with the generated image filenames.---
## π¦ Installation
1. **Clone this repository**
```bash
git clone https://github.com/andrepradika/combiner-image.git
cd combiner-image
```2. **Install dependencies**
```bash
pip install pillow
```---
## π οΈ Usage
1. **Prepare the required folders and files**
- Place **fabric images** in the `file_1/` folder.
- Place **sofa images** in the `file_2/` folder.
- Ensure the `data.csv` file contains:```csv
file_1;file_2
fabric1.jpg;sofa1.jpg
fabric2.png;sofa2.png
```2. **Run the script**
```bash
python main.py
```3. **Check the results**
- Combined images are saved in the `output_images/` folder.
- `data.csv` is updated with the result filenames.---
## π File Structure
```
image-combiner/
βββ file_1/ # Folder containing fabric images
βββ file_2/ # Folder containing sofa images
βββ output_images/ # Folder where combined images are saved
βββ data.csv # CSV file with input filenames
βββ main.py # Main script
βββ README.md # Documentation
```---
## π Example Output
A **fabric** image and a **sofa** image are stacked into a **new composite image** like this:
ποΈ **Sofa (top)**
π§΅ **Fabric (bottom)**---
## π·οΈ Topics
π **CSV Processing** β Reads and updates a CSV file for batch processing.
πΌοΈ **Image Manipulation** β Uses `Pillow` to resize and merge images.
β‘ **Automation** β Automatically combines multiple image pairs.
π **Python** β Simple, lightweight script for quick processing.---
## π License
This project is open-source under the **MIT License**.
## Author
andrepradika