conf and README

This commit is contained in:
2025-03-27 10:23:34 +08:00
parent 28cc4024c4
commit 7ab6790638
4 changed files with 49 additions and 9 deletions
+28 -2
View File
@@ -1,5 +1,31 @@
`python -m venv venv`
# collage-images
### Description
This project generates a character mosaic image by combining small images into a larger image based on a text mask.
### Prerequisites
- Python 3.8 or higher
- Install dependencies using `pip install Pillow`
### Setup Virtual Environment
To resolve potential Pillow version issues:
```bash
python -m venv venv
```
### Activate Virtual Environment
`./venv/Scripts/activate`
`pipreqs --force`
### Run
`python main.py`
Configuration
Edit the conf.py file to customize the following parameters:
* TARGET_TEXT: The text to be displayed in the mosaic.
* SMALL_IMAGES_DIR: Directory containing small images.
* OUTPUT_PATH: Path to save the generated mosaic image.
* OUTPUT_SIZE: Size of the output image (width, height).
* SMALL_IMG_SIZE: Size of each small image (width, height).
* FONT_PATH: Path to the font file (optional).
* FONT_SIZE: Font size for the text.