Scroll to navigation

PNG(3pm) User Contributed Perl Documentation PNG(3pm)

NAME

Imager::File::PNG - read and write PNG files

SYNOPSIS

  use Imager;
  my $img = Imager->new;
  $img->read(file=>"foo.png")
    or die $img->errstr;
  $img->write(file => "foo.png")
    or die $img->errstr;

DESCRIPTION

Imager's PNG support is documented in Imager::Files.

METHODS

Two low level class methods are provided, most for use by Imager::File::APNG, but it may later be used for other formats that can encapsulate PNG such as ICO.

"Imager::File::PNG->read($im, $io, %hsh)"
Read a PNG image from the supplied Imager::IO object $io into the Imager object $im.

Returns a true value on success.

"Imager::File::PNG->write($im, $io, %hsh)"
Write a PNG image to the supplied Imager::IO object $io from the Imager object $im.

Returns a true value on success.

AUTHOR

Tony Cook <tonyc@cpan.org>

SEE ALSO

Imager, Imager::Files.

2022-07-09 perl v5.34.0