Skip to content

HighSierra0820/ena-ascii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ena-ascii

A simple texture-aware ASCII art generator. Named after Ena Shinonome from Project Sekai.

Requirements

  • Python 3.?
  • PIL

Usage

  • genFont.py: reads a specified font and stores images of characters in assets\fontpic\
  • genPic.py inputImage [width]: resizes an image file (optional) and make an ascii art, storing into output\

How this work

  • convert images of glyphs into gray level matrices, elements ranging from 0 (black) to 255 (white)
  • slice inputImage into integral parts (after resizing and negating, if necessary) and convert it into a matrix too
  • treat aforementioned matrices as vectors, calculate dot product character-wise and accept the glyph with highest score

Samples

Sample Image Convert Result
Sample image Sample image (resized), converted into ascii art

References

About

a simple texture-aware ASCII art generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages