Metadata-Version: 2.4
Name: naymark
Version: 0.1.0
Summary: Remove an authorized, known watermark from images
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Requires-Dist: opencv-python-headless>=4.8
Dynamic: license-file

# Naymark

![Python 3.9+](https://img.shields.io/badge/Python-3.9%2B-3776AB?logo=python&logoColor=white)
![MIT License](https://img.shields.io/badge/License-MIT-green.svg)
![Development status](https://img.shields.io/badge/Status-Alpha-orange)
![NumPy](https://img.shields.io/badge/NumPy-1.23%2B-013243?logo=numpy&logoColor=white)
![OpenCV](https://img.shields.io/badge/OpenCV-4.8%2B-5C3EE8?logo=opencv&logoColor=white)

Naymark is a small Python package for removing the supported **visible watermark**
from Gemini-generated images. It uses a bundled image template to find matches
and reconstruct the surrounding pixels.

Naymark is intended for images you created or are authorized to modify. It is an
independent project and is not affiliated with Google or Gemini.

## What it does

- Finds matches for the bundled visible-watermark template across supported
  image scales.
- Processes image files or OpenCV-style BGR arrays.
- Reports match locations and scores, and can save the cleaned image.
- Runs locally; images are not uploaded to a service.

Naymark is designed for this template, not as a general-purpose watermark
remover. Pixel reconstruction is approximate, so inspect the output. It does
not target invisible provenance signals; follow any disclosure or attribution
requirements that apply to your images.

## For developers

### Install

After the package is published on PyPI:

```bash
python -m pip install naymark
```

### Python

```python
from naymark import remove_watermark

result = remove_watermark("input.jpg", "output.png")
print("Saved:", result.output_path)
print("Matches:", len(result.detections))
```

For file input, Naymark saves a sibling file named
`<filename>_cleaned<extension>` if no output path is supplied. For array input,
the cleaned image is available as `result.image`.

### Command line

The input and output paths are required:

```bash
naymark input.jpg output.png
```

#### Optional arguments

Both tuning arguments are optional and use the defaults shown below.

| Argument | Default | Description |
| --- | ---: | --- |
| `--threshold FLOAT` | `0.6` | Minimum template-match score for a detection. |
| `--max-watermarks INTEGER` | `5` | Maximum number of matches to remove from the image. |

For example, override either or both values:

```bash
naymark input.jpg output.png --threshold 0.7
naymark input.jpg output.png --max-watermarks 3
naymark input.jpg output.png --threshold 0.7 --max-watermarks 3
```

## For contributors

### Set up a local checkout

Create and activate a virtual environment, then install Naymark in editable
mode:

```bash
python -m venv .venv
python -m pip install -e .
```

### Run tests

```bash
python -m unittest discover -s tests -v
```

### Build distributions

```bash
python -m pip install build
python -m build
```

Build artifacts are written to `dist/`.

## License

Naymark is distributed under the MIT License. See [LICENSE](LICENSE).
