Image::TextMode::Renderer::GD - A GD-based renderer for text mode images


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

Index


NAME

Top

Image::TextMode::Renderer::GD - A GD-based renderer for text mode images

SYNOPSIS

Top

    use Image::TextMode::Format::ANSI;
    use Image::TextMode::Renderer::GD;

    my $ansi = Image::TextMode::Format::ANSI->new;
    $ansi->read( $file );

    my $renderer = Image::TextMode::Renderer::GD->new;

    # render fullscale version
    print $renderer->fullscale( $ansi );

    # render thumnail version
    print $renderer->thumbnail( $ansi );

DESCRIPTION

Top

This module allows you to render your text mode image though the GD graphics library.

METHODS

Top

new( %args )

Creates a new instance.

thumbnail( $source, \%options )

Renders a thumbnail-sized version of the image. This is mostly a pass-through to fullscale() with the resulting image being scaled down to 1 pixel width per 1 character column. Options specific to this method are:

* zoom - a zoom factor for the thumbnail (default: n/a)

See fullscale for all of the other available options.

fullscale( $source, \%options )

Renders a pixel-by-pixel representation of the text mode image. You may use the following options to change the output:

* crop - limit the display to this many rows (default: no limit)
* truecolor - set this to true to enable true color image output (default: false)
* 9th_bit - compatibility option to enable a ninth column in the font (default: false)
* ced - CED mode (black text on gray background) (default: false)
* font - override the image font; either a font object, or the last part of the clas name (e.g. 8x8)
* palette - override the image palette; either a palette object, or the last part of the class name (e.g. VGA)
* format - the output format (default: png)

AUTHOR

Top

Brian Cassidy <bricas@cpan.org>

COPYRIGHT AND LICENSE

Top


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