Img2Ascii

Additional

Language
Java
Version
1.1 (May 9, 2018)
Created
Oct 31, 2017
Updated
May 20, 2018 (Retired)
Owner
Ican Bachors (bachors)
Contributor
Ican Bachors (bachors)
1
Activity
Badge
Generate
Download
Source code

Android-Img2Ascii

Convert image to ascii.

Gradle

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

Usage

...

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

new Img2Ascii()
   .bitmap(image)
   .quality(3) // 1 - 5
   //.color(true)
   .convert(new Img2Ascii.Listener() {
      @Override
      public void onProgress(int percentage) {
         textView.setText(String.valueOf(percentage) + " %");
      }
      @Override
      public void onResponse(Spannable text) {
         textView.setText(text);
      }
   });

Demo