Menu

1 / 5

GlyphX: turning photos into ASCII art

DEV Community: flask·Subhadeep Paul·about 21 hours ago
#7g1BwmFw
#devtoflask#devto#dev#glyphx#ascii
Reading 0:00
15s threshold

GlyphX: turning photos into ASCII art

Brightness alone makes mushy ASCII art. That's the main thing to know about image-to-ASCII converters, and it's why I built GlyphX the way I did.

A few months ago I watched a reel on customizing your GitHub profile. It pointed to a README generator that turned my profile picture into ASCII art. I pasted it in and moved on. But I kept wondering what it would take to build one myself. So I did.

Try it: glyph-x.vercel.app

Code: github.com/devsensei404/GlyphX

What it does

Upload a photo, paste one, drag it in, or snap one with your camera. Pick a width from 20 to 300 columns, choose mono or color, and download the result as a PNG or JPEG. More columns means more detail. It's that simple.

How it works

Resize the image, measure the brightness of each cell, and map that to a character. GlyphX uses a 70-character ramp ordered by how much ink each glyph puts on screen. $ and @ sit at the dense end, a plain space at the other.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.