| Imager-Filter-Sepia documentation | Contained in the Imager-Filter-Sepia distribution. |
Imager::Filter::Sepia - filter that convert to sepia tone.
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'));
This is a sepia tone filter can specify color tone of Imager.
Valid filter parameters are:
Imager, Imager::Color, Imager::API, Imager::APIRef, http://imager.perl.org/
Yoshiki KURIHARA <kurihara __at__ cpan.org>
Copyright (c) 2006, Yoshiki KURIHARA <kurihara __at__ cpan.org>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
| 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__