Image::ANSIMation - Load, create, manipulate and save ANSI animation (ANSIMation) files


Image-ANSI documentation  | view source Contained in the Image-ANSI distribution.

Index


NAME

Top

Image::ANSIMation - Load, create, manipulate and save ANSI animation (ANSIMation) files

SYNOPSIS

Top

	use Image::ANSI::ANSIMation;

	# Read in a file...
	my $anim = Image::ANSIMation->new( file => 'file.ans' );

	# Image width and height
	my $w = $anim->width;
	my $h = $anim->height;

	# export it as a gif animation
	my $gif = $anim->as_gif;

DESCRIPTION

Top

This module allows you to load, create and manipulate files made up of ANSI escape codes, much like Image::ANSI, except that it can be composed of many frames creating an animation.

METHODS

Top

new( %options )

Creates a new ANSIMation. Currently only reads in data.

	# filename
	$anim = Image::ANSIMation->new( file => 'file.ans' );

	# file handle
	$anim = Image::ANSIMation->new( handle => $handle );

	# string
	$anim = Image::ANSIMation->new( string => $string );

read( %options )

Reads in ANSI data.

write( %options )

Writes the ANSI data to a file, filehandle or string.

as_string( %options )

Returns the ANSI output as a scalar.

add_frame( $frame )

Adds another frame to the animation

frames( )

Returns an array ref of frames.

current_frame( )

Returns an integer of the current position in the array of frames.

next_frame( )

Return the next frame in the sequence and add 1 to the current_frame.

width( )

Returns the width of the animation.

height( )

Returns the height of the animation.

as_gif( )

Return the animation as an animated gif.

AUTHOR

Top

* Brian Cassidy <bricas@cpan.org>

COPYRIGHT AND LICENSE

Top


Image-ANSI documentation  | view source Contained in the Image-ANSI distribution.