Imager::EnginesImager::Engines is a Perl module for programmable transformation operations. | |
Download |
Imager::Engines Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Arnar M. Hrafnkelsson and Anthony Cook
- Publisher web site:
- http://search.cpan.org/~tonyc/Imager-0.54/lib/Imager/Engines.pod
Imager::Engines Tags
Imager::Engines Description
Imager::Engines is a Perl module for programmable transformation operations. Imager::Engines is a Perl module for programmable transformation operations.SYNOPSIS use Imager; my %opts; my @imgs; my $img; ... my $newimg = $img->transform( xexpr=>'x', yexpr=>'y+10*sin((x+y)/10)') or die $img->errstr; my $newimg = Imager::transform2(%opts, @imgs) or die "transform2 failed: $Imager::ERRSTR"; my $newimg = $img->matrix_transform( matrix=>);transformThe transform() function can be used to generate spatial warps and rotations and such effects. It only operates on a single image and its only function is to displace pixels.It can be given the operations in postfix notation or the module Affix::Infix2Postfix can be used to generate postfix code from infix code. Look in the test case t/t55trans.t for an example.transform() needs expressions (or opcodes) that determine the source pixel for each target pixel. Source expressions are infix expressions using any of the +, -, *, / or ** binary operators, the - unary operator, ( and ) for grouping and the sin() and cos() functions. The target pixel is input as the variables x and y.You specify the x and y expressions as xexpr and yexpr respectively. You can also specify opcodes directly, but that's magic deep enough that you can look at the source code.Requirements:· Perl Requirements: · Perl
Imager::Engines Related Software