Dist-Zilla-Plugin-JSAN
view release on metacpan or search on metacpan
lib/Deployer/Image/PNG.pm view on Meta::CPAN
use Path::Class;
has 'filename' => (
is => 'rw',
required => 1
);
has 'iterations' => (
is => 'rw',
default => sub { 1 }
);
has 'use_lossless' => (
is => 'rw',
default => sub { 1 }
lib/Deployer/Image/PNG.pm view on Meta::CPAN
my ($self) = @_;
return file($self->filename)->stat->size;
}
sub optimize {
my ($self) = @_;
for (my $i = 0; $i < $self->iterations; $i++) {
$self->quantize() if $self->use_quantization;
$self->optimize_lossless() if $self->use_lossless;
}
}
sub optimize_lossless {
my ($self) = @_;
( run in 1.161 second using v1.01-cache-2.11-cpan-71847e10f99 )