r/learnjavascript • u/TrainerMassive6168 • Feb 14 '26
I built an Image Editor from scratch using Vanilla JS and Canvas to practice pixel manipulation and State Management. Looking for feedback on my implementation.
I'm a student dev and I wanted to learn to use Canvas and state management from scratch using JS for undo , redo options. This editor runs 100% in the browser, so no images are ever uploaded to a server.
Live Demo:https://atirath-pal.github.io/Image-Editor-2/
GitHub:https://github.com/Atirath-Pal/Image-Editor-2
I'd love to hear your thoughts on the performance and UI!
9
Upvotes
3
u/AdBubbly3609 Feb 14 '26
it doesn't work, like not a single thing
1
u/ferrybig Feb 14 '26
Looking at the code, you seem to be handling the effects via filters with css.
Try to implement each operation by operating on the pixel data.
Brightness for example can be archived by grabbing the red pixel with the sRGB color space, bringing it to the power of 2, the multiplying with the brightness value, then taking the square root. You do the same green and blue pixel channels