Skip to content

Commit

Permalink
helpers to run the three optimizers on the perl images
Browse files Browse the repository at this point in the history
  • Loading branch information
iamcal committed Aug 24, 2010
1 parent 1894945 commit 135285d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
9 changes: 7 additions & 2 deletions optimize.sh
@@ -1,5 +1,10 @@
#!/bin/sh

rm -f perl_optipng_images/*.png
optipng -zc1-9 -zm1-9 -zs0-3 -f0-5 -dir perl_optipng_images perl_images/*.png
rm -f perl_images_optipng/*.png
optipng -zc1-9 -zm1-9 -zs0-3 -f0-5 -dir perl_images_optipng perl_images/*.png

rm -f perl_images_pngcrush/*.png
pngcrush -brute -d perl_images_pngcrush/ perl_images/*

perl pngout.pl

13 changes: 13 additions & 0 deletions pngout.pl
@@ -0,0 +1,13 @@
#!/usr/bin/perl

use warnings;
use strict;

opendir D, "perl_images" or die $!;
while (my $file = readdir D){

if ($file =~ /\.png$/){

print `pngout-static -y perl_images/$file perl_images_pngout/$file`;
}
}

0 comments on commit 135285d

Please sign in to comment.