File: 2xpm.pl

package info (click to toggle)
xtux 0.2.010601-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 9,128 kB
  • ctags: 1,972
  • sloc: ansic: 11,330; makefile: 166; perl: 126; sh: 44
file content (14 lines) | stat: -rwxr-xr-x 299 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl

die "usage $0: BITMAP_FILE" unless @ARGV;

$TRANSCOLOR = "magenta";

foreach ( @ARGV ) {
	$old = $_;
	die "$old doesn't have a .bmp extension!\n" unless s/\.bmp$/.xpm/;
	rename $old, $_;
#Set transparencies
	$cmdline = "convert -transparent $TRANSCOLOR $_ $_";
	system($cmdline);
}