Trim2Circle is a web application that allows users to upload images, resize and crop them to a circle, and generate a PDF, PNG, or ZIP file with the processed images.
Custom figurines and tags for Teddy Cloud
https://github.com/toniebox-reverse-engineering/teddycloud
https://gt-blog.de/toniebox-hacking-how-to-get-started/
https://forum.revvox.de/t/teddycloud-esp32-newbie-documentation-deprecated/112
https://www.youtube.com/watch?v=JpMRyshgy9o
- Upload multiple images (PNG, JPG, JPEG)
- Resize images to a specified diameter
- Crop images to a circle
- Add a black border with a specified thickness (thanks sorz2122)
- Generate a PDF with the processed images
- Generate a PNG with the processed images
- Generate a ZIP file with the processed images
- Automatically convert multi-page PDFs to PNGs and package them in a ZIP file if necessary
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/jdp-code/Trim2Circle.git cd Trim2Circle
-
Build and run the application using Docker Compose:
docker compose up -d
-
Open your web browser and go to
http://localhost:5000
.
- Select the output format (PDF, PNG, or ZIP).
- If PDF or PNG is selected, specify the diameter (in mm) and the paper size.
- Optionally, specify the margin and spacing (in mm).
- Optionally, add a black border and specify the border thickness (in mm).
- Upload the images you want to process.
- Click the "Process" button to generate the output file.
To deploy Trim2Circle as a stack using Portainer, follow these steps:
-
Open Portainer and navigate to the "Stacks" section.
-
Click on "Add stack".
-
Name your stack (e.g.,
Trim2Circle
). -
In the "Web editor" section, paste the following content:
services: web: image: jdpcode/trim2circle #Only needed if building the image yourself #build: . ports: - "5000:5000" #Only needed if building the image yourself #volumes: #- .:/app #environment: # FLASK_ENV: production
-
Replace
/path/to/local/data
with the path to the directory on your host where you want to store the application data. -
Click "Deploy the stack".
-
Open your web browser and go to
http://<your-portainer-host>:5000
.
- Flask
- Pillow
- reportlab
- pdf2image
This project is licensed under the MIT License. See the LICENSE file for details.