npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

removebanana

v1.0.1

Published

Remove invisible AI watermarks (SynthID) from Google Gemini, Imagen 2, Imagen 3, and Nano Banana generated images using reverse alpha blending mathematics.

Readme

🍌 RemoveBanana

Remove invisible AI watermarks from Google Gemini-generated images using reverse alpha blending mathematics.

npm version License: MIT

Don't want to self-host? Use our free online tool: removebanana.eu.cc — No sign-up, unlimited usage, 100% browser-based! 🚀


What is this?

Google's AI image generators (Gemini, Imagen 2, Imagen 3, Nano Banana) embed invisible SynthID watermarks into every generated image. These watermarks are invisible to the human eye but can be detected by automated systems.

RemoveBanana uses the exact mathematical inverse of Google's alpha blending formula to perfectly reconstruct the original pixels — no AI guessing, no quality loss.

Gemini adds:     watermarked = α × logo + (1 - α) × original
We reverse it:   original = (watermarked - α × logo) / (1 - α)

Supported Models

  • ✅ Google Gemini (all versions)
  • ✅ Imagen 2
  • ✅ Imagen 3
  • ✅ Nano Banana AI

Installation

npm install removebanana canvas

Note: The canvas package (node-canvas) is required for Node.js usage. It provides the Canvas API that the engine needs for image processing.

Quick Start

Remove watermark from a file

const { removeWatermark } = require('removebanana');

// Simple usage — output saved as input_clean.png
await removeWatermark('./gemini-image.png');

// With custom output path
await removeWatermark('./input.png', './output.png');

// With options
await removeWatermark('./input.jpg', './output.jpg', {
  format: 'jpeg',
  quality: 0.95,
  silent: false
});

Remove watermark from a Buffer

const { removeWatermarkFromBuffer } = require('removebanana');
const fs = require('fs');

const inputBuffer = fs.readFileSync('./gemini-image.png');
const { buffer, meta } = await removeWatermarkFromBuffer(inputBuffer, {
  format: 'png'
});

fs.writeFileSync('./clean-image.png', buffer);
console.log('Watermark info:', meta.watermark);

Use in an Express API

const express = require('express');
const multer = require('multer');
const { removeWatermarkFromBuffer } = require('removebanana');

const app = express();
const upload = multer();

app.post('/api/remove-watermark', upload.single('image'), async (req, res) => {
  const { buffer } = await removeWatermarkFromBuffer(req.file.buffer, {
    format: 'png',
    silent: true
  });
  
  res.set('Content-Type', 'image/png');
  res.send(buffer);
});

app.listen(3000, () => console.log('API running on port 3000'));

API Reference

removeWatermark(inputPath, [outputPath], [options])

Remove watermark from a file and save the result.

| Parameter | Type | Description | |-----------|------|-------------| | inputPath | string | Path to the input image | | outputPath | string | (Optional) Output path. Defaults to input_clean.ext | | options.format | string | Output format: 'png', 'jpeg', 'webp' | | options.quality | number | Quality for lossy formats (0-1, default: 0.95) | | options.silent | boolean | Suppress console output |

Returns: Promise<{ outputPath: string, meta: Object }>

removeWatermarkFromBuffer(inputBuffer, [options])

Remove watermark from a Buffer and return the result as a Buffer.

| Parameter | Type | Description | |-----------|------|-------------| | inputBuffer | Buffer | Input image buffer | | options | Object | Same options as removeWatermark |

Returns: Promise<{ buffer: Buffer, meta: Object }>

How It Works

  1. Detect — Identifies the watermark size (48×48 or 96×96) and position using template correlation
  2. Extract Alpha Map — Calculates the watermark's alpha channel from reference templates
  3. Adaptive Detection — Uses coarse-to-fine template matching for non-standard positions
  4. Reverse Blend — Applies the inverse alpha blending formula to reconstruct original pixels
  5. Recalibrate — Fine-tunes alpha gain and sub-pixel alignment for perfect removal

Online Tool

Don't want to install anything? Use our free online tool:

🌐 removebanana.eu.cc

  • 100% browser-based — your images never leave your device
  • No sign-up required
  • Unlimited usage
  • All formats supported (PNG, JPEG, WebP)

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

Support the Project

If this tool saved you time, consider supporting us:

Buy Me a Coffee

License

MIT © RemoveBanana