DEV Community

Cover image for The "Censorship Brush" - GIMP enabled Invoice Redaction
Viorel PETCU
Viorel PETCU

Posted on

The "Censorship Brush" - GIMP enabled Invoice Redaction

Introduction: A Holiday Challenge Turned Innovation

This holiday season brought more than just cheer to my doorstep; it brought a mountain of delivery invoices. As I sorted through this paper avalanche, I realized that I needed to redact some sensitive information before recycling. But there was a catch – my trusty redaction roller had run out of ink. "No problem," I thought, and hopped online to order a replacement. However, the estimated delivery time was way past the city's pre-Christmas recycling pickup schedule.

In a moment of what I thought was brilliance, I decided to use my printer. Why not print something over the sensitive parts? And what better than the seemingly endless digits of Pi? After all, 6766 decimal places of Pi on an invoice seemed like a foolproof plan. It was a joyous moment of geeky triumph until I proudly presented my creation to my wife. She was less than impressed. "Isn't that a bit... wasteful?" she pointed out, both in terms of toner and recycling efficiency.

Her comment got me thinking. There had to be a smarter way to do this, a way that was economical yet effective. Because this is a lot of toner that you just waste, when in fact you only want a few lines or sections redacted

6766 digits of pi

Then it hit me – GIMP, the versatile image manipulation program, had all the tools I needed. I recalled a YouTube video about creating custom brushes in GIMP. With a spark of inspiration, I scanned an old, redacted page to capture the pattern left by the roller. From there, it was a matter of putting those GIMP skills to work and crafting a custom censorship brush.

Scanned image of the redacted paper to show the original pattern

What followed was an interesting journey of digital DIY and a testament to the power of open-source software. In this article, I'll guide you through the steps to create your own censorship brush in GIMP, turning a simple software tool into a powerful ally for maintaining your privacy.

GIMP logo or opening screen

Getting Started: GIMP Setup and Initial Preparations

⚠️ Disclaimer ⚠️ While this method has worked well for me, please be aware that using crumpled or improperly aligned invoices in your printer could cause damage. I share my experience for informational purposes and cannot guarantee the same results for everyone. Always use caution and at your own risk.

First things first, you will need GIMP, a scanner, or a very good lighting setup for your smartphone. I used my Brother DCP-1610 wireless printer and scanner.

The only other thing you will need is an image of random letters (here you can customize to your liking)

For example:

Enter fullscreen mode Exit fullscreen mode


Enter fullscreen mode Exit fullscreen mode

This you can screenshot for later use in the creation of the censorship brush.

Creating the Tool: Crafting a Custom Censorship Brush in GIMP

For anything, you might ever need to implement using GIMP, there is no better resource than Logos by Nick on YouTube.

The following is the exact tutorial I used to implement the brush

Towards the end of the tutorial, you are shown how to install the brush, but Nick is using Windows, if you are on Linux (like me) you would need to install the new brush at a location similar to:


The Redaction Process: Preparing and Censoring Your Invoice

Now that your GIMP has a new superpower, you are only a couple of steps away from perfectly censoring any invoice that is compatible with your printer!

Now you can scan the invoice(s) and get to work.

Step 1: Scan the invoice

This step is self-explanatory.

the scanned invoice

Step 2: Mark the places you want to redact

Start by adding a new layer fill it with white and reduce the opacity to 50%

named layers and opacity setting

Make sure the new top layer is selected, choose the rectangle select tool, and, with the shift key pressed start selecting areas you would like to redact.

Now that you have multiple areas selected, you can choose your new censorship brush, select the appropriate size and start stamping (do not click and drag) click, reposition and click again.

When all is done, you will end up with something like this

layers half transparent

Step 3: The Finish

All that is now left to do is to delete the invoice layer and restore the opacity to 100% for the redaction layer.

the censoring template

Now put the invoice in your printer on top of your paper stack (facing the right way) and PRINT, make sure to Ignore Page Margins

print dialog

Congratulations 🎉 you have now perfectly censored an invoice, so you can throw it in the recycle bin free of any remorse, both from a privacy point of view and also for the amount of wasteful toner.

Conclusion: Towards a More Automated and Efficient Future

As we've seen, GIMP is not just an image manipulation tool; it's also a powerful ally in maintaining privacy and reducing waste. This DIY approach to invoice censorship showcases the versatility and potential of open-source software in everyday tasks.

Looking ahead, there are exciting possibilities to further streamline and automate this process. Imagine leveraging GIMP's API to integrate with an automated system that detects and redacts sensitive information on invoices. This could be integrated with hardware solutions, enabling a seamless scan, censor, and print workflow.

I'm also considering creating a repository of censorship masks tailored for different types of invoices, making it even easier for others to adopt this method without starting from scratch.

WOW you are still reading !?



Did this guide help you create your own censorship brush in GIMP? Do you have other innovative ideas for hacking one thing to do another unintended thing? Share your thoughts, experiences, or any questions in the comments below.

Top comments (0)