1 package Imager::File::PNG;
4 use vars qw($VERSION @ISA);
10 XSLoader::load('Imager::File::PNG', $VERSION);
13 Imager->register_reader
18 my ($im, $io, %hsh) = @_;
20 $hsh{png_ignore_benign_errors}
21 and $flags |= IMPNG_READ_IGNORE_BENIGN_ERRORS;
22 $im->{IMG} = i_readpng_wiol($io, $flags);
25 $im->_set_error(Imager->_error_as_msg);
32 Imager->register_writer
37 my ($im, $io, %hsh) = @_;
39 $im->_set_opts(\%hsh, "i_", $im);
40 $im->_set_opts(\%hsh, "png_", $im);
42 unless (i_writepng_wiol($im->{IMG}, $io)) {
43 $im->_set_error(Imager->_error_as_msg);
54 Imager::File::PNG - read and write PNG files
60 my $img = Imager->new;
61 $img->read(file=>"foo.png")
64 $img->write(file => "foo.png")
69 Imager's PNG support is documented in L<Imager::Files>.
73 Tony Cook <tonyc@cpan.org>
77 Imager, Imager::Files.