Making crisp, transparent PNGs from snapshots off your phone

Now and again I want a crisp digital copy of something that I, a team member, friend, etc., wrote on a whiteboard or piece of paper. I’d played around with a couple free online converters, but they all have clumsy thresholds and significantly downsample the images.

This repo lets you make conversions like this:

It’s a dead-simple script file wrapped up for command line execution. To call the demo run:


Here’s a kind of fun example of using multiple colors that also plays with the sigmoid filter. Run:

python --in_file ./balloons-over-bagan.jpg --out_file ./balloons.png --targets 182 109 58 121 29 39 103 118 77 --steepness 0.25 --offset 40

To go from this…

to this:

Enjoy! Let me know if you have any questions or suggestions. I’ve been using this script to turn my home whiteboard sketches into much cleaner renderings that can be easily printed out without wasting a punch of ink. Sometimes it’s nice to have a space that’s even bigger to draw on than an iPad, but without having to save all the unnecessary noise.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aaron Polhamus

Working with Team Vest to transform how retail investing is done throughout the Americas 🌎