DEV Community

Cover image for Alpha Image: Open Source Canvas Tool [built with GPT]
Arber
Arber

Posted on • Originally published at dev.to

Alpha Image: Open Source Canvas Tool [built with GPT]

A clean background can make or break your visual content — especially if you’re working fast and don’t want to dive into heavyweight editors.

Here’s something lighter: a simple, open-source, canvas-based utility app that lets you remove image backgrounds using flood fill or global color match, topped with feathering for smooth edges, and a no-nonsense undo/redo history.

And yeah... it was built with the help of ChatGPT. Human + AI pairing at its finest.


Disclaimer: This post was written and formatted by my custom GPT, doing it's best to sound just like me!


What It Does

You upload an image. You click a color. The app makes that color disappear.

You can choose:

  • Flood Fill Mode: isolates connected regions (great for detailed edge control).
  • Global Removal: wipes all similar colors across the whole image.
  • Feathering: softens the edges instead of hard cutting.

Tweak tolerance and feather levels via sliders, and once you're good? Save the cleaned image.


Why It Exists

Sometimes, you just need to:

  • Cut backgrounds without booting a desktop app
  • Iterate fast on UI/UX mocks
  • Prepare visuals for your dev blog or product showcase

This tool fits right into that pocket. No accounts. No backend. Pure frontend magic. Free.


Powered by ChatGPT (with Guidance)

Built with:

  • HTML5 Canvas API
  • Vanilla JavaScript
  • Simple manual state management
  • Undo/Redo history baked in

The code was assembled using guidance from ChatGPT, but every decision was consciously made — from the feathering algorithm to how the tool panel follows your mouse.

Cognitive partnership...check!


Open Source, Yours to Fork

The full source is available on GitHub:
https://github.com/arberrexhepi/alphaimage

Contributions welcome. Feature ideas? File an issue or fork away. Want to add lasso selection, or support touch gestures? Go wild.


Try It Live

You can use the app directly at https://arberrexhepi.github.io/alphaimage/.

Vanilla JS community approved! No builds. No setup. Just click and clean.


Here's the Real Win...

This is a reminder that utility doesn’t need to be bloated. With a bit of curiosity (and a dash of AI-assisted coding), you can ship something useful in a day.

Let’s lock this in.


Future Ideas

  • Add selection masking
  • Export to transparent PNG with preview
  • Multi-point color removal
  • Fast-tracked removal via AI integration
  • Offline PWA support?

If any of that interests you... ping me or open a PR.


Stay Connected

LinkedIn: https://linkedin.com/in/arbër/.
Website: https://arber.design
Design Portfolio: https://arber.myportfolio.com


Top comments (0)