Creating a Pixel Desktop App with ChatGPT in Just 20 Minutes

Johannes C. 1 Tallied Votes 76 Views Share

Turning ideas into executable code has never been easier. This is the story of how I created a small program that turns your photos into pixel art in less than half an hour – with a little help from my AI assistant.

ai-coding-assistant.jpg

The program is called PixelPotion, and you can download it here (13 MB). Its functionality is simple: you select an image from your computer (.jpg, .png, .webp, etc.), choose the pixelation level (5-100%), and convert it to 8-bit style (a new file will appear next to the input file).

pixelpotion-cap.JPG

Our dog, Naid, volunteered as a test subject. Here’s a shot of him at 20%, 50%, and 100% pixelation:

pixel-naid.jpg

Before you wonder: Yes, I know this is absolutely useless software (who wants to lower the quality of their images, anyway?), and I don’t expect Adobe to buy me out anytime soon. I also don’t expect you to be wowed by the capabilities of PixelPotion – the interesting part is how the program was created. It was written in Python, turned into an executable, fitted with an icon, troubleshot, and beta-tested, all within 20-30 minutes. The next part of this article explains in more detail how this was possible. Also, for what it’s worth, I like pixel art – so let’s just roll with it for the sake of an example xD

AI Assisted Coding – The Story of PixelPotion

First, I am not an experienced coder. I learned some programming languages as a teen, but since then, I've mainly been involved in projects from a coordination standpoint. Aside from the occasional Python script to make my life easier, I’ve hardly written any code myself in the past 20 years. Much like any other language, programming felt like a “use it or lose it” skill to me – after years without touching a compiler, the thought of starting a new coding project seemed daunting. Even just selecting the right libraries and creating a simple user interface that meets today’s standards would take me days, if not weeks, of catching up through endless message boards. So, before the rise of LLMs, creating a program like PixelPotion "just for fun" would have never crossed my mind.

Since my professional focus is on Search Engine Optimization, I’ve mostly been exploring AI tools for technical SEO. As it turns out, ChatGPT is incredibly helpful for troubleshooting many issues, and I use it frequently to find quick, elegant fixes for bugs that could lower a site’s ranking. Coders, too, have been praising AI’s capabilities in assisting with programming tasks for years now. So, I figured I'd give it a shot and asked ChatGPT to create PixelPotion with me. Even as an experienced LLM user, I was surprised by how quickly we turned my idea into an actual program, and I think anyone who knows how to distinguish between file extensions could do the same.

Here’s how it went:

  1. I started a new chat with ChatGPT-4o and shared my basic idea: a Windows program that converts images to an 8-bit pixel art style.
  2. ChatGPT asked me to choose a programming language (C# or Python), specify whether I wanted a user interface, and suggested additional features like drag-and-drop support.
  3. I chose Python for its simplicity and said I wanted a user interface with drag-and-drop. ChatGPT gave me a list of the necessary steps, which we then elaborated on in detail.
  4. Since I already had Python and Git installed, I just needed to install the required libraries (ChatGPT provided a list) and create a new project folder.
  5. We ironed out the details of the conversion process, including a reduced color palette, downscaling, contrast adjustments, and a color filter for a "retro" effect.
  6. ChatGPT wrote the initial Python code, which ran correctly on the first test. We adjusted a few details to ensure the file paths were dynamic (allowing the program to run on other computers, too).
  7. I realized that the pixelation level depended entirely on the original resolution of the input image, so I thought it would be better if users could choose the pixelation strength. We updated the code to include a "Pixelation Level" slider in the user interface.
  8. Once the .py file did everything I wanted, we compiled it into a standalone executable. This step required some troubleshooting because an issue with the icon path caused an error message. This is the kind of issue that might have cost me half a day on a message board, but with ChatGPT, I identified the error and found a solution in about two minutes.

My assistant took care of several other details too: It designed the icon (which I only had to edit slightly and convert to .ico format), wrote the README.txt, suggested a list of names, and helped me pick one. As this exercise was just an experiment, I left it at that. But it would be easy to improve the program and add features like customizable filters, preview images, and an option to select the output folder.

The Bottom Line

Your offbeat app idea has never been as feasible as it is today. As experienced entrepreneurs know, ideas are the easy part of any project. While AI tools won’t find you investors or build your user base, taking your ideas from concept to prototype has become a lot easier.

Yes, PixelPotion is useless software, but creating an executable program from scratch in less than half an hour on just one cup of coffee is pretty mind-blowing to me. It literally took me longer to write this article – so I hope you enjoyed the read!

jkon 636 Posting Whiz in Training Featured Poster

I understand that a chatbot is more friendly to use than Google, but the same functionality is in 1000 places in Python code on Internet. It would be easier to Google it and use the code. Do you believe that using a chatbot saved you time for this ?

Johannes C. 3 Light Poster

I understand that a chatbot is more friendly to use than Google, but the same functionality is in 1000 places in Python code on Internet. It would be easier to Google it and use the code. Do you believe that using a chatbot saved you time for this ?

Absolutely! You are right that the code was the easy part that I probably could have fixed together by googling. What blew my mind was the help on the "project-management"-end - i.e. helping me to select the right libraries, creating the UI and explaining how to convert to an executable. After not doing this in many years, I suspect the little bug alone would have costs me hours to figure out.

For people who are new to coding or want to learn something new, it can be great help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.