#!/home/ben/software/install/bin/perl
use warnings;
use strict;
use utf8;
use FindBin '$Bin';
use Image::PNG::Util ':all';

for my $file (@ARGV) {
    my $wpng = rmalpha ($file, unusedonly => 1);
    if (! $wpng) {
	warn "Too bad!";
	next;
    }
    my $noalpha = $file;
    if (! ($noalpha =~ s!\.png!-noalpha.png!)) {
	warn "Failed $file";
	next;
    }
    $wpng->write_png_file ($noalpha);
}

# Local variables:
# mode: perl
# End:
