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.
β
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.
-
Clone this repository
git clone https://github.com/andrepradika/combiner-image.git cd combiner-image
-
Install dependencies
pip install pillow
-
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:file_1;file_2 fabric1.jpg;sofa1.jpg fabric2.png;sofa2.png
-
-
Run the script
python main.py
-
Check the results
- Combined images are saved in the
output_images/
folder. data.csv
is updated with the result filenames.
- Combined images are saved in the
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
A fabric image and a sofa image are stacked into a new composite image like this:
ποΈ Sofa (top)
π§΅ Fabric (bottom)
π 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.
This project is open-source under the MIT License.
andrepradika