#!/usr/bin/perl

use GD;

foreach $file( @ARGV ) {
    open( IN, "<$file" );
    $img = newFromGif GD::Image(IN);
    close( IN );
    next unless $img;
    open( OUT, ">$file" );
    if( $img->transparent < 0 ) {
	$img->transparent(0);
    }
    print OUT $img->gif;
    close OUT;
}
