Recently, ZDNet's David Gewirtz found himself in a classic marital tech support scenario. His wife Denise, who sings with her church's choir, needed to scan song booklets (printed on yellow paper, roughly trade paperback size) into PDFs, remove the yellow background, and reprint them larger on 8.5-by-11-inch paper so she could read without her reading glasses. She also planned to feed the music into PlayScore 2, an app that plays sheet music for sing-along purposes, and worried the yellow might confuse the software.

Gewirtz initially suggested Photoshop, but found the process too fiddly - each image required different slider settings. So he suggested ChatGPT, which Denise uses via a ChatGPT Plus account. That worked for removing the yellow, but the output was low resolution. A follow-up request fixed that, but ChatGPT subtly altered the resulting PDFs. Denise was concerned it might change the notes or words, leading her to practice the wrong music.

As Gewirtz explains, ChatGPT and other AIs are "non-deterministic" - they can produce different outputs from the same input, like a chatty plumber. Denise wanted a strictly deterministic tool, something that wouldn't take liberties with her musical masters. Gewirtz, who wrote an interactive image management tool for his Harvard Python certification, knew Python had the libraries to do the job but had no time to write the code himself.

So he did what any reasonable person would: he used the non-deterministic AI to write a deterministic Python script. He gave ChatGPT a prompt requesting a script that takes JPEGs or PDFs and sets non-gray/black pixels to white, preserving slightly tinted grays for black text on colored backgrounds. By the time dinner was done (he was also helping prepare a rotisserie chicken), ChatGPT had produced a working script.

The resulting tool, decolor_pdf.py, runs from the command line and outputs a new PDF with background color removed. Gewirtz posted it on his GitHub repo, demonstrating with a public domain song by jazz great Fats Waller (co-written with Andy Razaf, known for "Ain't Misbehavin'").

The takeaway? If you need a quick solution, ask ChatGPT to write it for you. It worked for Gewirtz, who both solved his wife's problem and de-chickelated a rotisserie chicken simultaneously.