Skip to content

LiulietLee/ImageToASCII

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ImageToASCII

A model about transforming an image to ASCII characters written by Swift.

Install

Just move the "Source/LLTransformer.swift" to your project.

Usage

You can download this project to see the simple example.

let transformer = LLTransformer()
let yourImage = UIImage(named: "your_image_title.png")
let text = transformer.convertUIImageToText(image: yourImage, clarity: 98)
label.text = text     // or some other cool things

The convertUIImageToText(image: UIImage, clarity: Int) -> String function return a string and it has two arguements:

  • image: The UIImage which will be converted.
  • clarity: It's greater than 0 and smaller than 100. The greater the argurment, the clearer the string picture.

About

Transforming an image to ASCII characters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages