=encoding utf8

=head1 NAME

Plack::Middleware::Image::Dummy - Dummy image responser for Plack

=head1 SYNOPSIS

    ## example.psgi

    builder {
        # basic
        enable 'Image::Dummy', map_path => '/', font_path => './font/MTLmr3m.ttf';

        # map path with regex
        enable 'Image::Dummy', map_path => qr/^\//, font_path => './font/MTLmr3m.ttf';
            enable 'Image::Dummy';

        enable 'Image::Dummy', map_path => '/', font_path => './font/MTLmr3m.ttf', param_filter => sub {
            my $params = shift;
            if ($ENV{PLACK_ENV} eq 'production') {
                print STDERR "Do not show under production environment.\n";
                undef;
            } else {
                $params->{text} .= ':D';
                $params;
            }
        };

        $app;
    };

=head1 DESCRIPTION

Plack::Middleware::Image::Dummy is dummy image responser for Plack like L<http://dummyimage.com/>.

=head1 CONFIGURATION

=head2 map_path

URI path mapped to this module.

=head2 font_path

Font path.

=head2 param_filter

A code reference. The code called with one HashRef contains parsed parameters.
Evaluated value is used in image creation.

=head1 URI

You can get a image detailed in URI like below.

    http://host:port#{map_path}/#{width}x#{height}.#{ext}?param=value&...

=head2 path

You can specify width, height and file type (ex. png, gif, jpg) in path of URI.

=head2 text

You can specify text written in the center of the image. Default is #{width}x#{height}.

=head2 color

You can specify text color.

=head2 bgcolor

You can specify background color.

=head2 minsize

You can specify minimum size of font.

=head1 AUTHOR

Tasuku SUENAGA a.k.a. gunyarakun E<lt>tasuku-s-cpan ATAT titech.acE<gt>

=head1 REPOSITORY

L<https://github.com/gunyarakun/p5-Plack-Middleware-Image-Dummy>

    git clone git://github.com/gunyarakun/p5-Plack-Middleware-Image-Dummy.git

=head1 SEE ALSO

L<Imager>

L<Imager::File::GIF>

=head1 LICENSE

Files in 'font' directory are licenced under the Apache Licence 2.0.

Copyright (C) Tasuku SUENAGA a.k.a. gunyarakun

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