🎞️ Image Filter Editor
Apply grayscale, sepia, invert, brightness and contrast filters to an image with a live preview, then download the result. Everything runs locally in your browser.
The maths behind each control
Nothing is uploaded. Your image is decoded, drawn to a canvas at full size and every pixel rewritten in JavaScript on your own machine. The filter runs first, then brightness is added, then contrast is stretched around mid-grey:
grayscale : 0.299R + 0.587G + 0.114B
invert : 255 - value
factor : (259 × (C + 255)) / (255 × (259 - C))
contrast : factor × (value - 128) + 128
Pure red becomes #4C4C4C in grayscale, because 0.299 × 255 is 76. Contrast at +100 gives a factor of 2.27, so a value of 160 jumps to 201; at -100 the factor is 0.44 and the same 160 falls back to 142. Sepia uses the classic three-row matrix, weighting red highest and blue lowest.
Using the controls
- Move a slider, then press Apply. The sliders do not redraw on their own; only choosing a file or clicking Apply repaints the canvas.
- Every Apply starts from the original. Effects never stack, so you can wind a setting back without reloading the file.
- Brightness is additive, not a multiplier. At +100 anything already above 155 is clipped to pure white and the detail there is flat.
Frequently asked questions
How do I make a photo black and white?
Pick Grayscale and press Apply. It uses luminance weighting rather than a flat average, so greens read lighter and blues darker, which is how the eye actually sees them.
Why does nothing change when I drag a slider?
The redraw is tied to the Apply button. Set the filter, brightness and contrast the way you want them, then click Apply once and the preview and download link both refresh.
Can I use two filters at the same time?
Only one of grayscale, sepia and invert at a time, but either can be combined with brightness and contrast. To layer them, download the result and load that PNG back in as the new source.