HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/share/man/man3/Imager::Transform.3pm
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Imager::Transform 3"
.TH Imager::Transform 3 "2020-06-13" "perl v5.26.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
.Vb 1
\&  Imager::Transform \- a library of register machine image transformations
.Ve
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 10
\&  # get a list of transformations
\&  my @funcs = Imager::Transform\->list;
\&  # create a transformation object
\&  my $tran = Imager::Transform\->new($name);
\&  # describe it
\&  print $tran\->describe;
\&  # a list of constant names
\&  my @constants = $tran\->constants;
\&  # information about some of the constants
\&  my @info = $tran\->constants(@constants);
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This module provides a library of transformations that use the Imager
\&\fBtransform2()\fR function.
.PP
The aim is to provide a place to collect these transformations.
.PP
At some point there might be an interface to add new functions, but
there's not a whole lot of point to that.
.PP
The interface is a little sparse as yet.
.SH "METHODS"
.IX Header "METHODS"
.ie n .IP "my @names = Imager::Transform\->list" 4
.el .IP "my \f(CW@names\fR = Imager::Transform\->list" 4
.IX Item "my @names = Imager::Transform->list"
Returns a list of the transformations.
.ie n .IP "my $desc = Imager::Transform\->describe($name);" 4
.el .IP "my \f(CW$desc\fR = Imager::Transform\->describe($name);" 4
.IX Item "my $desc = Imager::Transform->describe($name);"
.PD 0
.ie n .IP "my $desc = $tran\->\fBdescribe()\fR" 4
.el .IP "my \f(CW$desc\fR = \f(CW$tran\fR\->\fBdescribe()\fR" 4
.IX Item "my $desc = $tran->describe()"
.PD
Describes a transformation specified either by name (as a class
method) or by reference (as an instance method).
.Sp
The class method returns undef if there is no such transformation.
.ie n .IP "my $tran = Imager::Transform\->new($name)" 4
.el .IP "my \f(CW$tran\fR = Imager::Transform\->new($name)" 4
.IX Item "my $tran = Imager::Transform->new($name)"
Create a new transformation object.  Returns undef if there is no such
transformation.
.ie n .IP "my @inputs = $tran\->inputs;" 4
.el .IP "my \f(CW@inputs\fR = \f(CW$tran\fR\->inputs;" 4
.IX Item "my @inputs = $tran->inputs;"
.PD 0
.ie n .IP "my $inputs = $tran\->inputs;" 4
.el .IP "my \f(CW$inputs\fR = \f(CW$tran\fR\->inputs;" 4
.IX Item "my $inputs = $tran->inputs;"
.PD
Returns a list of input image descriptions, or the number of them,
depending on content.
.Sp
The list contains hash references, which current contain only one
member, \f(CW\*(C`desc\*(C'\fR, a description of the use of the input image.
.ie n .IP "$tran\->constants" 4
.el .IP "\f(CW$tran\fR\->constants" 4
.IX Item "$tran->constants"
Returns a list of names of constants that can be set for the
transformation.
.ie n .IP "$tran\->constants($name, $name, ...)" 4
.el .IP "\f(CW$tran\fR\->constants($name, \f(CW$name\fR, ...)" 4
.IX Item "$tran->constants($name, $name, ...)"
Returns a hashref for each named constant, which contains the default
in key \f(CW\*(C`default\*(C'\fR and a description in key \f(CW\*(C`desc\*(C'\fR.
.ie n .IP "my $out = $tran\->transform(\e%opts, \e%constants, @imgs)" 4
.el .IP "my \f(CW$out\fR = \f(CW$tran\fR\->transform(\e%opts, \e%constants, \f(CW@imgs\fR)" 4
.IX Item "my $out = $tran->transform(%opts, %constants, @imgs)"
Perform the image transformation.
.Sp
Returns the new image on success, or undef on failure, in which case
you can use \f(CW$tran\fR\->errstr to get an error message.
.ie n .IP "$tran\->errstr" 4
.el .IP "\f(CW$tran\fR\->errstr" 4
.IX Item "$tran->errstr"
The error message, if any from the last image transformation.
.SH "BUGS"
.IX Header "BUGS"
Needs more transformations.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBImager\fR\|(3), \fItransform.perl\fR
.SH "AUTHOR"
.IX Header "AUTHOR"
Tony Cook <tonyc@cpan.org>