Gemini sparkle remover
Use this when a user needs to remove a visible Gemini sparkle/corner mark from an image while preserving the original and producing clear before/after proof.
This skill uses allenk/GeminiWatermarkTool by default. It edits visible pixels only; it does not edit metadata or invisible watermarking.
What this does
- Keeps the source image unchanged.
- Installs or locates
allenk/GeminiWatermarkTool. - Runs
GeminiWatermarkToolon the source image. - Creates a derivative image with the visible sparkle removed when the tool detects it.
- Produces a review sheet with full-image and bottom-right crop before/after proof.
- Reports the tool output, diff metrics, and whether removal was attempted.
Setup
The remover comes from:
https://github.com/allenk/GeminiWatermarkTool
For a fresh agent/environment, run setup from this skill directory and install the latest release binary:
TOOL_DIR="$PWD/.tools/GeminiWatermarkTool-src"
git clone https://github.com/allenk/GeminiWatermarkTool.git "$TOOL_DIR"
cd "$TOOL_DIR"
python3 - <<'PY'
import json
import platform
import urllib.request
from pathlib import Path
repo = 'allenk/GeminiWatermarkTool'
release = json.load(urllib.request.urlopen(f'https://api.github.com/repos/{repo}/releases/latest', timeout=30))
tag = release['tag_name']
assets = {asset['name']: asset['browser_download_url'] for asset in release['assets']}
system = platform.system().lower()
if system == 'linux':
asset = 'GeminiWatermarkTool-Linux-x64.zip'
elif system == 'darwin':
asset = 'GeminiWatermarkTool-macOS-Universal.zip'
elif system == 'windows':
asset = 'GeminiWatermarkTool-Windows-x64.zip'
else:
raise SystemExit(f'unsupported platform: {platform.system()}')
for name in [asset, 'SHA256SUMS.txt']:
url = assets[name]
print(f'downloading {name} from {tag}')
urllib.request.urlretrieve(url, name)
PY
sha256sum -c SHA256SUMS.txt --ignore-missing
python3 - <<'PY'
import zipfile
from pathlib import Path
zip_path = next(Path('.').glob('GeminiWatermarkTool-*.zip'))
with zipfile.ZipFile(zip_path) as z:
z.extractall('dist')
PY
chmod +x ./dist/GeminiWatermarkTool
./dist/GeminiWatermarkTool --version
cd - >/dev/null
Then either pass the binary explicitly:
python3 templates/sparkle_remover.py \
--tool ./.tools/GeminiWatermarkTool-src/dist/GeminiWatermarkTool \
--input ./samples/source.png \
--output ./samples/derivative.png \
--review ./samples/review.jpg
or export it once for the session:
export ALLENK_GEMINI_WATERMARK_TOOL="$PWD/.tools/GeminiWatermarkTool-src/dist/GeminiWatermarkTool"
Install Python dependencies for the wrapper/review sheet:
python3 -m pip install Pillow
Recommended workflow
- Copy the source image and keep the original unchanged.
- Make sure
GeminiWatermarkToolis installed and available via--tool,ALLENK_GEMINI_WATERMARK_TOOL, orPATH. - Run the remover script and create a derivative plus review sheet.
- Inspect the review sheet at high zoom:
- the sparkle should be gone or visibly reduced
- the local texture should not smear badly
- there should be no dark inverse sparkle, blur blob, or obvious rectangular patch
- nothing outside the expected watermark region should change
- If the result is bad, leave the original unchanged and investigate the real watermark geometry instead of guessing with broad pixel edits.
Command pattern
Run on an image:
python3 templates/sparkle_remover.py \
--tool ./.tools/GeminiWatermarkTool-src/dist/GeminiWatermarkTool \
--input ./samples/source.png \
--output ./samples/derivative.png \
--review ./samples/review.jpg
Create a synthetic test image to verify wrapper/review-sheet wiring only. This does not prove remover quality, because the synthetic sparkle is not a real Gemini watermark profile:
python3 templates/sparkle_remover.py \
--tool ./.tools/GeminiWatermarkTool-src/dist/GeminiWatermarkTool \
--make-sample ./samples/source.png \
--output ./samples/derivative.png \
--review ./samples/review.jpg \
--no-remove
Useful flags:
--tool /path/to/GeminiWatermarkTool # override remover binary
--no-remove # copy image and make proof only
Verification checklist
Before reporting success, verify:
- The original file still exists and was not overwritten.
- The derivative output exists.
- Source and derivative dimensions match.
- The review sheet exists.
- The sparkle is gone or visibly reduced in the bottom-right crop.
- No obvious blur blob, dark inverse sparkle, rectangular patch, or off-target edit was introduced.
- The JSON report says
method: allenk/GeminiWatermarkToolandscope: visible_pixel_sparkle_removal.
See references/verification-checklist.md for a compact review checklist.