A browser-based image filter :)
- Real-time SVG halftone filters: Two filter styles (
half-toneandhalf-tone-hd) - ASCII mode: Converts images into text-based ASCII art in the browser
- Color customization: Color picker to adjust the effect tone
- Client-side processing: Runs entirely in the browser
- Simple interface: Upload an image, choose a filter, and preview the result instantly
- Open the app in your browser.
- Select an image using the file picker.
- Choose a filter:
None,half-tone,half-tone-hd, orascii. - Use the color picker to change the effect tone.
- View the result instantly.
The app uses two different approaches depending on the selected mode:
- Luminance extraction: Converts the image to grayscale luminance values.
- Threshold mapping: Splits luminance into 8 discrete levels.
- Pattern generation: Applies circles of varying sizes based on brightness.
- Final composition: Combines all levels to render the halftone effect.
- The uploaded image is drawn to a hidden canvas.
- Pixel brightness is sampled and converted to grayscale luminance.
- Brightness is mapped to characters from a gradient string.
- The result is rendered as ASCII text in the page.
half-tone: 8x8 pixel grid with circles ranging from 0.5 to 4.0 radius.half-tone-hd: 4x4 pixel grid with circles ranging from 0.25 to 2.0 radius for higher detail.ascii: Converts the image into ASCII art text.
- HTML structure and controls.
- SVG filter definitions.
- ASCII output container and hidden canvas.
- Preview image.
- Handles file uploads.
- Applies SVG filters.
- Generates ASCII output with Canvas.
- Updates the effect color dynamically.
- Basic layout and spacing.
- Image display styles.
- ASCII output styling.