Img2Ascii

Additional

Language
Java
Version
1.0 (Oct 31, 2017)
Created
Oct 31, 2017
Updated
Nov 1, 2017
Owner
Ican Bachors (bachors)
Contributor
Ican Bachors (bachors)
1
Activity
Badge
Generate
Download
Source code

Advertising

Android-Img2Ascii

Convert image to ascii.

Gradle

allprojects {
   repositories {
      ...
      maven { url 'https://jitpack.io' }
   }
}
dependencies {
    ...
    compile 'com.github.bachors:Android-Img2Ascii:1.0'
}

Usage

...

// bitmap
Bitmap image = BitmapFactory.decodeResource(getResources(), R.drawable.image);
// Bitmap image = BitmapFactory.decodeFile(filename);

// quality
int quality = 3; // 1 - 3

// convert image(bitmap) to ascii(string)
Img2Ascii image2ascii = new Img2Ascii();
String ascii = image2ascii.convert(image, quality);

// textView.setTypeface(monospaceFont);
// textView.setText(ascii);

Demo