1Imager::Transform(3)  User Contributed Perl Documentation Imager::Transform(3)
2
3
4

NAME

6         Imager::Transform - a library of register machine image transformations
7

SYNOPSIS

9         # get a list of transformations
10         my @funcs = Imager::Transform->list;
11         # create a transformation object
12         my $tran = Imager::Transform->new($name);
13         # describe it
14         print $tran->describe;
15         # a list of constant names
16         my @constants = $tran->constants;
17         # information about some of the constants
18         my @info = $tran->constants(@constants);
19

DESCRIPTION

21       This module provides a library of transformations that use the Imager
22       transform2() function.
23
24       The aim is to provide a place to collect these transformations.
25
26       At some point there might be an interface to add new functions, but
27       there's not a whole lot of point to that.
28
29       The interface is a little sparse as yet.
30

METHODS

32       my @names = Imager::Transform->list
33           Returns a list of the transformations.
34
35       my $desc = Imager::Transform->describe($name);
36       my $desc = $tran->describe()
37           Describes a transformation specified either by name (as a class
38           method) or by reference (as an instance method).
39
40           The class method returns undef if there is no such transformation.
41
42       my $tran = Imager::Transform->new($name)
43           Create a new transformation object.  Returns undef if there is no
44           such transformation.
45
46       my @inputs = $tran->inputs;
47       my $inputs = $tran->inputs;
48           Returns a list of input image descriptions, or the number of them,
49           depending on content.
50
51           The list contains hash references, which current contain only one
52           member, "desc", a description of the use of the input image.
53
54       $tran->constants
55           Returns a list of names of constants that can be set for the
56           transformation.
57
58       $tran->constants($name, $name, ...)
59           Returns a hashref for each named constant, which contains the
60           default in key "default" and a description in key "desc".
61
62       my $out = $tran->transform(\%opts, \%constants, @imgs)
63           Perform the image transformation.
64
65           Returns the new image on success, or undef on failure, in which
66           case you can use $tran->errstr to get an error message.
67
68       $tran->errstr
69           The error message, if any from the last image transformation.
70

BUGS

72       Needs more transformations.
73

SEE ALSO

75       Imager(3), transform.perl
76
77
78
79perl v5.12.3                      2011-06-06              Imager::Transform(3)
Impressum