Image::Term256Color - Display images in your 256 color terminal!


NAME

Image::Term256Color - Display images in your 256 color terminal! (kinda)

Back to Top


VERSION

Version 0.01

Back to Top


SYNOPSIS

Converts an image to 256 color terminal displayable ascii. Mostly for fun.

    use Image::Term256Color;
    print Image::Term256Color::convert( 'myimage.jpg' ) . "\n";

Scalar context spits out a string containing term color coded text representing the entire image.

    print Image::Term256Color::convert( 'myimage.jpg' , { scale_ratio => .5 } ) . "\n";

Scale 'myimage.jpg' by 50% before converting.

    my @img_rows = Image::Term256Color::convert( 'myimage.jpg' );

Array context gives an array of strings. Each string representing a row within the image. Unlike scalar context, there are no newlines.

Back to Top


SUBROUTINES/METHODS

convert

Image::Term256Color::convert( $filename , \%options );

Image::Term256Color::convert( *FILEHANDLE , \%options );

Image::Term256Color::convert( $data , \%options );

Accepts a $filename , *FILEHANDLE or scalar containing image data for PNG , Jpeg , Gif and GD2 image types. This is thrown right into GD::Image (See GD);

The \%options hashref may consist of:

Returns a color coded string with newlines in scalar context and an array of strings represting rows in the image in array context.

Returns a 0 in scalar context and empty array in array context if there is an error with the provided image.

Back to Top


EXAMPLES

Please look at the img2term manpage bundled with this distribution.

Back to Top


AUTHOR

Colin, <moshen at cpan.org>

Back to Top


BUGS

Please report any bugs or feature requests through the web interface at https://github.com/moshen/Image-Term256Color/issues. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

Back to Top


SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Image::Term256Color

You can also look for information at:

Back to Top


ACKNOWLEDGEMENTS

GD! It does all the work.

Back to Top


LICENSE AND COPYRIGHT

Copyright 2011 Colin.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

Back to Top

 Image::Term256Color - Display images in your 256 color terminal!