The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Text::AAlib - Perl Binding for AAlib

SYNOPSIS

use Text::AAlib;
use Imager;

my $img = Imager->new( file => 'sample.jpg' );
my ($width, $height) = ($img->getwidth, $img->getheight);

my $aa = Text::AAlib->new(
    width  => $width,
    height => $height,
    mask   => AA_REVERSE_MASK,
);

$aa->put_image(image => $img);
print $aa->render();

DESCRIPTION

Text::AAlib is perl binding for AAlib. AAlib is a library for creating ascii art(AA).

INTERFACE

Class Methods

Text::AAlib->new(%args)

Creates and returns a new Text::AAlib instance.

%args is:

Instance Methods

$aalib->putpixel(%args)

$aalib->puts(%args)

$aalib->put_image(%args)

$aalib->render(%args) :Str

Render buffer and return it as plain text. You can specify render parameter following

$aalib->as_string($with_attr) :Str

Return AA as string. If $with_attr is true, text attribute(BOLD, DIM, REVERSE) is enable.

$aalib->resize()

Resize buffers at runtime.

$aalib->flush()

Flush buffers.

$aalib->close()

Close AAlib context.

AUTHOR

Syohei YOSHIDA syohex@gmail.com

COPYRIGHT

Copyright 2011- Syohei YOSHIDA

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Some idea are taken from python-aalib. http://aa-project.sourceforge.net/aalib/

http://jwilk.net/software/python-aalib