Imager::Filter::Sepia - filter that convert to sepia tone.


Imager-Filter-Sepia documentation Contained in the Imager-Filter-Sepia distribution.

Index


Code Index:

NAME

Top

Imager::Filter::Sepia - filter that convert to sepia tone.

SYNOPSIS

Top

    use Imager;
    use Imager::Filter::Sepia;

    $img->filter(type => 'sepia');
    # or if you set color tone
    $img->filter(type => 'sepia', tone => Imager::Color->new('#FF0000'));

DESCRIPTION

Top

This is a sepia tone filter can specify color tone of Imager.

Valid filter parameters are:

METHODS

Top

sepia()

SEE ALSO

Top

Imager, Imager::Color, Imager::API, Imager::APIRef, http://imager.perl.org/

AUTHOR

Top

Yoshiki KURIHARA <kurihara __at__ cpan.org>

LICENCE AND COPYRIGHT

Top


Imager-Filter-Sepia documentation Contained in the Imager-Filter-Sepia distribution.

package Imager::Filter::Sepia;

use warnings;
use strict;
use Imager 0.54;
use vars qw(@ISA $VERSION);

BEGIN {
    $VERSION = "0.02";
    eval {
        require XSLoader;
        XSLoader::load('Imager::Filter::Sepia', $VERSION);
        1;
    } or do {
        require DynaLoader;
        push @ISA, 'DynaLoader';
        bootstrap Imager::Filter::Sepia $VERSION;
    };
}

my %defaults = (tone => Imager::Color->new(rgb => [ 0, 0, 0 ] ));

Imager->register_filter(type     => 'sepia',
                        callsub  => sub { my %hsh = @_; sepia($hsh{image}, $hsh{tone}) },
                        defaults => \%defaults,
                        callseq  => [ 'image' ] );


1;
__END__