<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dan Dan</title>
    <description>The latest articles on DEV Community by Dan Dan (@dan_dan_26ba75efedd611b1f).</description>
    <link>https://dev.to/dan_dan_26ba75efedd611b1f</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3861119%2F313287a1-6058-4460-b25d-b1dd0d63c620.png</url>
      <title>DEV Community: Dan Dan</title>
      <link>https://dev.to/dan_dan_26ba75efedd611b1f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dan_dan_26ba75efedd611b1f"/>
    <language>en</language>
    <item>
      <title>How I built a browser-based AI watermark remover with Next.js and Canvas API</title>
      <dc:creator>Dan Dan</dc:creator>
      <pubDate>Sat, 04 Apr 2026 14:36:58 +0000</pubDate>
      <link>https://dev.to/dan_dan_26ba75efedd611b1f/how-i-built-a-browser-based-ai-watermark-remover-with-nextjs-and-canvas-api-g22</link>
      <guid>https://dev.to/dan_dan_26ba75efedd611b1f/how-i-built-a-browser-based-ai-watermark-remover-with-nextjs-and-canvas-api-g22</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;AI tools like Gemini and Doubao add watermarks to generated images. Removing them usually requires&lt;br&gt;
  desktop software or paid services. I wanted something instant, free, and private.&lt;/p&gt;

&lt;p&gt;## The Solution&lt;/p&gt;

&lt;p&gt;CleanMark — 4 tools, all running client-side in the browser.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gemini Watermark Remover (auto-detect &amp;amp; remove)&lt;/li&gt;
&lt;li&gt;Doubao Watermark Remover (auto-detect &amp;amp; remove)&lt;/li&gt;
&lt;li&gt;Manual Eraser (brush tool for any custom watermark)&lt;/li&gt;
&lt;li&gt;Logo Overlay (cover watermarks with your own brand)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;## Tech Stack&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next.js 16 App Router&lt;/li&gt;
&lt;li&gt;Canvas API for image processing&lt;/li&gt;
&lt;li&gt;next-intl for i18n (EN/ZH)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;## How the Watermark Removal Works&lt;/p&gt;

&lt;p&gt;The core idea is Canvas-based inpainting — analyze pixels around the watermark and fill with&lt;br&gt;
  surrounding colors.&lt;/p&gt;

&lt;p&gt;### For Gemini &amp;amp; Doubao (Automatic)&lt;/p&gt;

&lt;p&gt;These AI tools embed watermarks at fixed, predictable positions. So we:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Load the image onto an HTML canvas&lt;/li&gt;
&lt;li&gt;Identify the watermark region (known coordinates/pattern)&lt;/li&gt;
&lt;li&gt;Sample neighboring pixels outside the watermark area&lt;/li&gt;
&lt;li&gt;Fill the region using a weighted average of surrounding pixels&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;### For Manual Eraser&lt;/p&gt;

&lt;p&gt;The user paints over the watermark with a brush:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sample pixels around each stroke point&lt;/li&gt;
&lt;li&gt;Apply blur/average to blend with surroundings&lt;/li&gt;
&lt;li&gt;Result looks natural because it inherits local texture&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;### Why Client-Side?&lt;/p&gt;

&lt;p&gt;All processing uses the native browser Canvas API — no server needed. The image never leaves the&lt;br&gt;
  device, zero privacy risk, instant results.&lt;/p&gt;

&lt;p&gt;## Try it&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cleanmark.org" rel="noopener noreferrer"&gt;https://cleanmark.org&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sunzhenyu/CleanMark" rel="noopener noreferrer"&gt;https://github.com/sunzhenyu/CleanMark&lt;/a&gt;&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>javascript</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
