Imager...ansform(3pm)

πŸ¦‹ Imager...ansform(3pm) πŸ¦‹

Okay so this page is from the User Contributed Perl Documentation crew, and the manual name is right there in the title: Imager...ansform(3pm). Yes, dots and all β€” we are not editing the iconic truncation, bestie. πŸ’…

🌸 NAME 🌸

Imager::Transform β€” a library of register machine image transformations. That's the whole assignment. πŸ’–

✨ SYNOPSIS ✨

# 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);

πŸŽ€ DESCRIPTION πŸŽ€

This module provides a library of transformations that use the Imager transform2() function. Lowkey the whole point is to have a place to collect these transformations together. 🫢

At some point there might be an interface to add new functions, but there's not a whole lot of point to that. Not me explaining the entire roadmap in one sentence. πŸ’€

The interface is a little sparse as yet. It's giving "small but mighty," bestie. ✨

πŸ’… METHODS πŸ’…

  • my @names = Imager::Transform->list β€” Returns a list of the transformations. Simple, iconic, no notes. πŸ‘‘
  • my $desc = Imager::Transform->describe($name) / my $desc = $tran->describe() β€” Describes a transformation specified either by name (as a class method) or by reference (as an instance method). The class method returns undef if there is no such transformation. πŸŽ€
  • my $tran = Imager::Transform->new($name) β€” Create a new transformation object. Returns undef if there is no such transformation. No cap. πŸ’–
  • my @inputs = $tran->inputs / my $inputs = $tran->inputs β€” Returns a list of input image descriptions, or the number of them, depending on content. The list contains hash references, which currently contain only one member, "desc", a description of the use of the input image. πŸ¦‹
  • $tran->constants β€” Returns a list of names of constants that can be set for the transformation. Collect them like little PokΓ©mon, bestie. ✨
  • $tran->constants($name, $name, ...) β€” Returns a hashref for each named constant, which contains the default in key "default" and a description in key "desc". πŸŽ€
  • my $out = $tran->transform(\%opts, \%constants, @imgs) β€” Perform the image transformation. Returns the new image on success, or undef on failure, in which case you can use $tran->errstr to get an error message. Main character transformation energy. πŸ”₯
  • $tran->errstr β€” The error message, if any from the last image transformation. 😭

πŸ’€ BUGS πŸ’€

Needs more transformations.

That's it. That's the whole bug list, and honestly? It's giving "we just want more slay." πŸ’€

🌈 SEE ALSO 🌈

Go peep those, bestie. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Tony Cook <tonyc@cpan.org> β€” take a bow. πŸ‘‘


Catch you later, bestie! This footer is brought to you by perl v5.42.3, dated 2026-08-19, and that's the tea. πŸ’…βœ¨

πŸ“¦ where this page comes from