Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Trash PaNDA icon Trash PaNDA

Example of masked text in NDepend screenshot

What is Trash PaNDA?

Trash PaNDA is a tool to mask text from your images using SixLabors' ImageSharp and Microsoft's Computer Vision API.
Think of it as an automated redaction tool - just like you see with the odd Government report or statement. I initially designed it to be used to mask client names from screenshots of my code and tool windows, to comply with non-disclosure agreements (NDAs).

How do I use it?

Download with Chocolatey: choco install trashpanda Use in your own projects with Nuget: Install-Package TrashPaNDA Or check out the Releases tab for nightlies.

  1. Download, build the src\TrashPaNDA\TrashPaNDA.csproj.
  2. Call TrashPandaHelper.ReplaceWordsInImage():
    • string apiKey - your Cognitive Services API key;
    • byte[] originalImage - your original image stream in a byte array (ImageSharp will handle PNG, JPEG, GIF and BMP);
    • string[] wordsToReplace - an array of words to replace (case-insensitive);
    • int scaleUp - an optional scale factor to improve text recognition (leave as 1 & it'll scale automatically);
    • 'string endpoint' - optional, used to specify a specific Computer Vision API endpoint URI (see here for a list of acceptable endpoints)
  3. Do what you want with the resulting byte[] - MemoryStream, save to file, etc.


PR's always accepted!


ImageSharp is licensed under an Apache 2.0 License.
Microsoft Cognitive Services API is licensed under an MIT License.
The Trash PaNDA logo is courtesy of Danielle Papanikolaou under the Pixabay License.


A tool to mask text from screenshots using Azure Computer Vision API & ImageSharp




No releases published


No packages published