Tirsvad 18894f1fb0
TirSystem/git-workflows: Release / release (push) Skipped
TirSystem/git-workflows: Publish accepted milestones / publish (push) Skipped
TirSystem/git-workflows: Publish wiki / publish-wiki (push) Successful in 11s
TirSystem/git-workflows: Sync GitHub mirror metadata / sync-metadata (push) Successful in 5s
TirSystem/git-workflows: Validate / validate (push) Successful in 18s
TirSystem/git-workflows: OpenGrep / opengrep (push) Successful in 1m3s
Merge pull request 'Reflection wiki pages: the Product Owner's own words' (#63) from wiki-reflection-own-words into main
2026-11-20 05:35:22 +01:00
2026-11-20 07:39:43 +08:00
2026-11-20 07:39:43 +08:00
2026-11-19 16:19:46 +01:00

🚀 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

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:

  1. Step 1: a window where you upload an image (upload_image).
  2. Step 2: a text watermark with position and opacity (add_watermark).
  3. Step 3: a logo watermark.
  4. 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 dev group), 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 1: the empty window Step 1: the window with an uploaded image

🖋️ 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 2: a text watermark Step 2: the watermark 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 3: a logo watermark Step 3: the logo 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
Step 4: the window ready to save Step 4: the picture 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.

📎 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

S
Description
Desktop app that uploads an image, adds a text or logo watermark and saves the result. Python 3.13, Tkinter and Pillow. Udemy 100 Days of Code, day 85.
Readme AGPL-3.0
984 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 96.6%
Shell 3.1%
Dockerfile 0.3%