gemini-logo-remover
Remove the Gemini watermark from images with one function call.
pip install gemini-logo-remover
from gemini_logo_remover import remove_logo
remove_logo("gemini-image.png", "clean.png")
How it works
The watermark only sits in the bottom-right corner. This package cuts out that corner (at most 480×480 px), sends only that small piece to the Gemini Logo Remover API, and pastes the cleaned corner back into your original image on your machine.
- Uploads are tiny (a few hundred KB), so it is fast.
- Every pixel outside the corner is returned exactly as it was — the server never re-compresses your picture.
- The removal itself runs on the hosted API (a Cloudflare Worker), not on your computer. Your images are not stored; only the corner crop is sent.
The server reverses the watermark's alpha blend (lossless) and falls back to AI inpainting only for what that cannot explain.
Usage
One image
from gemini_logo_remover import remove_logo
result = remove_logo("in.png", "out.png") # saves out.png
print(result.method, result.clean, result.warnings)
# no file written, work with the Pillow image instead
result = remove_logo("in.png")
result.image.show()
result.save("later.jpg") # .jpg -> JPEG, otherwise PNG
image can be a path, bytes, an open binary file, or a PIL.Image.
Result fields: image, method (alpha, inpaint, alpha+inpaint, none),
detected, slot, confidence, clean, warnings, output_path.
Many images, in parallel
from gemini_logo_remover import remove_logo_many
items = remove_logo_many(["a.png", "b.png", "c.jpg"], "cleaned/", workers=3)
for item in items:
print(item.source, "ok" if item.ok else f"failed: {item.error}")
One bad file never stops the others; failures are returned in the list. Keep workers
at 3 or less on the free hosted API.
Command line
gemini-logo-remover photo.png # writes photo_clean.png next to it
gemini-logo-remover *.png -o cleaned/ --workers 3
gemini-logo-remover photo.png --mode alpha # lossless only
python -m gemini_logo_remover photo.png # same thing
Options
| Option | Default | Meaning |
|---|---|---|
mode |
auto |
auto: reverse the watermark, inpaint only what is left. alpha: lossless only, never inpaints (image unchanged + a warning if it cannot). inpaint: skip alpha. |
sparkle |
False |
Also inpaint the small V3 slot. Unverified; can damage text near the corner. |
api_url |
hosted API | Your own server. Or set GEMINI_LOGO_REMOVER_API_URL. |
api_key |
none | If the server requires a key. Or set GEMINI_LOGO_REMOVER_API_KEY. |
retries |
3 |
Extra attempts on 429 / 5xx / network errors / cut-off replies. |
timeout |
180 |
Seconds per request. |
Errors
InvalidImageError— the input is not a readable image.ApiError— the API rejected the request or kept failing. Has.statusand.code.GeminiLogoRemoverError— base class of both.
Limits
The hosted API runs on a free tier. Expect to process a few images at a time, not
thousands. Point api_url at your own deployment of the server for heavy use.
Development and publishing
cd python
pip install -e ".[dev]"
pytest
python -m build # creates dist/*.whl and dist/*.tar.gz
twine check dist/*
twine upload --repository testpypi dist/* # try it on TestPyPI first
twine upload dist/* # publish to PyPI
Uploading needs a PyPI account and an API token (pypi.org → Account settings → API tokens);
use __token__ as the username and the token as the password. Bump version in
pyproject.toml (and __version__) for every release — PyPI never lets you re-upload the
same version.
Metadata
Release files for gemini-logo-remover 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gemini_logo_remover-0.1.0.tar.gz | 13.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gemini_logo_remover-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.3 kB
Release files / gemini_logo_remover-0.1.0.tar.gz
| Download URL | gemini_logo_remover-0.1.0.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5bf18433b4916357195b9316136d9a515a7a9d8de8161a8845bb1b59c9f05f6f
|
|
BLAKE2b-256 checksum How to use checksums |
d30e973bb64b8d0127c2ffdc2cd64c09a8ef3f5aabb31e148d3d6c7ee67a091b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / gemini_logo_remover-0.1.0-py3-none-any.whl
| Download URL | gemini_logo_remover-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a5d3f55852fc465d752a69c22b5fa726e0b67ff0ab16853c0ec7acb102cbc83
|
|
BLAKE2b-256 checksum How to use checksums |
c0a8c9d85cbc2f7f12b7ec4e3988cddbac92c575528987a56787d8fc2a5b78e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|