logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

       Tony Cook <tonyc@cpan.org>

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.

Name

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

See Also

       Imager, Imager::Files.

perl v5.40.1                                       2025-03-16                                           PNG(3pm)

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;

See Also