Answer the question
In order to leave comments, you need to log in
Perl programming
Good afternoon!
There is one Perl project called Image PNG Rewriter . The essence of the work is to compress PNG using Compress-Deflate7 for this , but I still can’t get it to work, it doesn’t compress images.
It seems that everything is installed, the code is using the following
parameters perl new.pl old.png new.png Algorithm 1 Pass 15 FastBytes 128 Cycles 2
I really hope for help
use Image::PNG::Rewriter;
use Compress::Deflate7;
use IO::File;
my ($in, $out) = splice @ARGV, 0, 2;
IO::File->new($out, '>:raw')->syswrite(
Image::PNG::Rewriter->new(handle => IO::File->new($in, '<:raw'), zlib => \&zlib7)->as_png
);
sub zlib7 {
Compress::Deflate7::zlib7($_[0], @ARGV);
}
Answer the question
In order to leave comments, you need to log in
Rewrite your code in a human way so that it can be read. Look and see the error.
I would love to, but the code is not mine, one person kindly wrote it to me. This is my first time working with Perl.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question