mohit
← back

ASCIIFY

Finds the subject and gives it the whole frame, so logos come out as sharp as photographs

  • Swift100%

ASCIIFY turns your photos into art made entirely of keyboard characters, the way every hacker in a 90s movie would have wanted. Pick a photo, drag a slider to decide how many characters wide it gets, choose soft shading or hard-edged two-tone, then paste it into the group chat or save it to Photos as an image. Your cat, rendered in @ and #.

No libraries, just CoreGraphics and a conversion engine of about 460 lines. The photo is decoded with its orientation fixed, then the app hunts for a plain border and crops it away, because a logo floating in white space would otherwise get a third of the grid and turn to mush. A character is roughly twice as tall as it is wide, so the image gets squashed vertically to match, contrast is stretched across the middle 96% of tones, and each cell picks from .:-=+*#%@ by how much ink it needs. Copying was sneakier than expected: chat apps wreck the alignment, so the clipboard gets a code-fenced copy that renders monospaced plus RTF with a pinned font for everything else. The engine never touches UIKit, so the same code also builds a Mac command-line tool for tuning the output without booting a simulator.

ASCIIFY architecture: the SwiftUI app passes a picked photo to AsciiCore, which decodes it and runs five steps (crop, grid size, sample, normalize, map) before the art goes back to the clipboard as text and RTF or to Photos as a PNG.
system architecture · click for full size
  • SwiftUI
  • CoreGraphics
  • ImageIO
  • PhotosUI
  • XCUITest