🚀 Watermark Image
A desktop application that uploads an image, adds a text or logo watermark and saves the result. It is the Day 85 assignment of the Udemy course "100 Days of Code: The Complete Python Pro Bootcamp", written for course participants and for visitors who want a readable, runnable example.
📚 Table of Contents
- Overview
- Requirements
- Setup
- Run
- Step 1: upload
- Step 2: text watermark
- Step 3: logo watermark
- Step 4: save
- Reflection
- Tests
- License
- Links
- Appendix: Project documents
🧭 Overview
The program is built in four steps, and each step has a screenshot here and a wiki page (English, Danish and Bahasa Malaysia) that explains what the step taught:
- Step 1: a window where you upload an image (
upload_image). - Step 2: a text watermark with position and opacity (
add_watermark). - Step 3: a logo watermark.
- Step 4: saving the result without touching the original (
save_image).
The repository is laid out as follows:
| Folder or file | Holds |
|---|---|
src/watermark_image/ |
The application, in layers: domain, application, infrastructure and presentation |
src/watermark_image/constants.py |
Every constant of the application |
tests/ |
The pytest tests: unit, integration and e2e |
docs/ |
Project documents, the wiki sources (docs/wiki/) and the screenshots (docs/screenshots/) |
docker/gui/ |
The Linux container in which graphical tests and screenshots run |
scripts/ |
check.sh, the quality gate, and run-gui-tests.sh, the container runner |
pyproject.toml |
The single configuration file of the project and its tools |
Doxyfile |
The Doxygen configuration for the source comments |
📋 Requirements
- Python 3.13 or newer, with Tkinter (included in the standard installers of Python).
- Pillow, the only runtime dependency: Tkinter alone cannot read JPEG files or blend a watermark with transparency.
- For development only: pytest, pytest-cov, ruff, mypy and import-linter (installed with the
devgroup), Doxygen for the source manual, Docker for graphical tests and screenshots, and opengrep for the security scan.
🛠️ Setup
Create a local virtual environment named .venv, activate it, upgrade pip and install the project.
On Windows (PowerShell):
python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
On Linux and macOS:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
Leave the environment with deactivate. Install without the development tools with python -m pip install -e ..
▶️ Run
With the environment active:
python -m watermark_image
The program starts from step 1 on. The controls of each step are described in the wiki.
🖼️ Step 1: upload
The window has an Upload image button and a preview area. The wiki page Step 1 explains what the step taught, in English, Danish and Bahasa Malaysia.
| At start | After upload |
|---|---|
![]() |
![]() |
🖋️ Step 2: text watermark
The control panel on the right takes a text, a size, a colour, one of nine places and an opacity; Add watermark lays the text over the picture and the original stays unchanged. The wiki page Step 2 explains what the step taught, in English, Danish and Bahasa Malaysia.
| Text added | Placed in a corner |
|---|---|
![]() |
![]() |
🏷️ Step 3: logo watermark
Choose Logo as the watermark type, press Choose logo, pick a picture file and set its size as a percentage of the picture width. Place and opacity work as for the text. A logo with a transparent background lets the picture show through. The wiki page Step 3 explains what the step taught, in English, Danish and Bahasa Malaysia.
| Logo added | Placed in a corner |
|---|---|
![]() |
![]() |
💾 Step 4: save
Once a watermark is added, Save image opens a save dialog and writes the marked picture to a new .png, .jpg or .jpeg file. Choosing the original file is refused, so the original is never overwritten. The wiki page Step 4 explains what the step taught, in English, Danish and Bahasa Malaysia.
| Ready to save | Saved |
|---|---|
![]() |
![]() |
🪞 Reflection
The assignment ends with a reflection on the approach, what was hard and easy, and what to do differently. The wiki page Reflection holds a draft, in English, Danish and Bahasa Malaysia.
🧪 Tests
With the environment active:
python -m pytest
Before a push, run the whole quality gate (tests with coverage, ruff, mypy, import-linter and the opengrep scan):
bash scripts/check.sh
Graphical tests and screenshots never run on your desktop. They run in a Linux container with a virtual display:
bash scripts/run-gui-tests.sh python -m pytest -m gui
Build the source manual with doxygen Doxyfile; it is written to build/doxygen/index.html.
📄 License
GNU Affero General Public License, version 3. See the LICENSE file.
🔗 Links
- Repository
- Documentation
- Issue tracker
- Pillow and the Tkinter documentation, the two references of the assignment
- Watermarkly, a similar online service
📎 Appendix: Project documents
The documents a newcomer needs, in reading order.
| Document | What it tells you |
|---|---|
| Business Case | Why the project exists, its scope and success criteria |
| Stakeholder Analysis | Who is involved; the stakeholder IDs used for owners and reviewers |
| Project Plan | The gateways and their schedule |
| Milestones | One document per gateway: Go/No-Go criteria and tasks |
| Artifact registry | Where each artifact type lives, the next version, the PO language and domain |
| Traceability matrix | How the artifacts link and when each was last reviewed |
| Framework README | The framework this project uses |
| Framework changelog | What changed in each framework release |







