enough_ascii_art 1.0.0 copy "enough_ascii_art: ^1.0.0" to clipboard
enough_ascii_art: ^1.0.0 copied to clipboard

Generates ASCII art using image to ASCII, FIGlet text banner support and emoticon to text conversions.

example/enough_ascii_art_example.dart

import 'dart:io';
import 'package:enough_ascii_art/enough_ascii_art.dart' as art;
import 'package:image/image.dart' as img;

void main() async {
  final bytes = await File('./example/enough.jpg').readAsBytes();
  final image = img.decodeImage(bytes)!;
  var asciiImage = art.convertImage(image, maxWidth: 40, invert: true);
  print('');
  print(asciiImage);

  var helloWithUtf8Smileys = 'hello world 😛';
  var helloWithTextSmileys =
      art.convertEmoticons(helloWithUtf8Smileys, art.EmoticonStyle.western);
  print('');
  print(helloWithTextSmileys);
  print('');

  print('cosmic:');
  var fontText = await File('./example/cosmic.flf').readAsString();
  var figure = art.renderFiglet('ENOUGH', art.Font.text(fontText));
  print(figure);
  print('');

  var unicode = art.renderUnicode('hello world', art.UnicodeFont.doublestruck);
  print('double struck:');
  print(unicode);
}
26
likes
130
points
170
downloads

Publisher

verified publisherenough.de

Weekly Downloads

Generates ASCII art using image to ASCII, FIGlet text banner support and emoticon to text conversions.

Repository (GitHub)

Documentation

API reference

License

MPL-2.0 (license)

Dependencies

image

More

Packages that depend on enough_ascii_art