<?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>Forem: Khaled BH</title>
    <description>The latest articles on Forem by Khaled BH (@khaledbh).</description>
    <link>https://forem.com/khaledbh</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%2F3867554%2F61fc2ed3-abad-496b-9435-691e6708874f.png</url>
      <title>Forem: Khaled BH</title>
      <link>https://forem.com/khaledbh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/khaledbh"/>
    <language>en</language>
    <item>
      <title>How I Built AI-Powered Auto-Redaction Into a Desktop Screenshot Tool</title>
      <dc:creator>Khaled BH</dc:creator>
      <pubDate>Wed, 08 Apr 2026 10:30:08 +0000</pubDate>
      <link>https://forem.com/khaledbh/how-i-built-ai-powered-auto-redaction-into-a-desktop-screenshot-tool-13of</link>
      <guid>https://forem.com/khaledbh/how-i-built-ai-powered-auto-redaction-into-a-desktop-screenshot-tool-13of</guid>
      <description>&lt;p&gt;Screenshots are everywhere — docs, bug reports, Slack, tweets. And half the time they've got an email,&lt;br&gt;
IP address, or API key sitting right there in the open.&lt;/p&gt;

&lt;p&gt;I built &lt;a href="https://snpit.app" rel="noopener noreferrer"&gt;https://snpit.app&lt;/a&gt;, a screenshot beautifier for Windows and macOS. It started as a tool to make&lt;br&gt;
screenshots look nice (gradient backgrounds, annotations, export). But the feature people keep asking&lt;br&gt;
about is the auto-redact.&lt;/p&gt;

&lt;p&gt;How it works&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Capture any region on screen&lt;/li&gt;
&lt;li&gt;Click the AI Redact button&lt;/li&gt;
&lt;li&gt;OCR scans the image and regex patterns match sensitive data&lt;/li&gt;
&lt;li&gt;Black bars cover every match&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Built-in patterns handle emails, phone numbers, IPs, and serial keys.&lt;/p&gt;

&lt;p&gt;The problem with dark backgrounds&lt;/p&gt;

&lt;p&gt;Tesseract (the OCR engine) is great at reading dark text on light backgrounds. But white text on a dark&lt;br&gt;
background? It just misses it.&lt;/p&gt;

&lt;p&gt;So I added multi-pass scanning. Every image gets processed 3 times:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Original — catches normal text&lt;/li&gt;
&lt;li&gt;Inverted — flips all pixels so white-on-dark becomes black-on-light&lt;/li&gt;
&lt;li&gt;High-contrast threshold — converts to pure black and white at 128&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Results get merged and deduplicated. This is what made credit card screenshots actually work.&lt;/p&gt;

&lt;p&gt;Custom regex + AI generation&lt;/p&gt;

&lt;p&gt;The built-in patterns cover common stuff. But what about internal ticket IDs, custom API key formats, or&lt;br&gt;
proprietary codes?&lt;/p&gt;

&lt;p&gt;Instead of asking users to write regex (nobody wants to), I added an AI button. You describe what to&lt;br&gt;
find in plain English:&lt;/p&gt;

&lt;p&gt;▎ "AWS access keys"&lt;/p&gt;

&lt;p&gt;The AI generates the regex pattern. You can review it, test it, save it for reuse, or just run it once.&lt;/p&gt;

&lt;p&gt;AI Vision&lt;/p&gt;

&lt;p&gt;There's also a built-in AI chat that reads your screenshot. You can ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"What error is shown?"&lt;/li&gt;
&lt;li&gt;"Summarize the text in this screenshot"&lt;/li&gt;
&lt;li&gt;"Generate alt text for this image"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Runs on a self-hosted model, streams responses, keeps conversation context.&lt;/p&gt;

&lt;p&gt;The stack&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Desktop app: Electron + React + Fabric.js&lt;/li&gt;
&lt;li&gt;OCR: Tesseract.js v7 (runs locally, no cloud)&lt;/li&gt;
&lt;li&gt;AI: Private model -- Nothing will be logged.&lt;/li&gt;
&lt;li&gt;Backend: Laravel 12 + Stripe + Cloudflare R2&lt;/li&gt;
&lt;li&gt;Website: &lt;a href="https://snpit.app" rel="noopener noreferrer"&gt;https://snpit.app&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything runs locally. Screenshots never leave your machine unless you explicitly publish to cloud.&lt;/p&gt;

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

&lt;p&gt;Free to download, free to use the core features: &lt;a href="https://snpit.app/download" rel="noopener noreferrer"&gt;https://snpit.app/download&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you work with screenshots that contain sensitive data, I'd genuinely love feedback on the redaction&lt;br&gt;
accuracy. Especially edge cases — weird fonts, low contrast, unusual formats.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>privacy</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
