Skip to content

πŸ›‹οΈ 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! 🎨✨

Notifications You must be signed in to change notification settings

andrepradika/combiner-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‹οΈ 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

    git clone https://github.com/andrepradika/combiner-image.git
    cd combiner-image
  2. Install dependencies

    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:

      file_1;file_2
      fabric1.jpg;sofa1.jpg
      fabric2.png;sofa2.png
      
  2. Run the script

    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

About

πŸ›‹οΈ 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! 🎨✨

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages