aboutsummaryrefslogtreecommitdiff
path: root/icons/icon.pl
diff options
context:
space:
mode:
Diffstat (limited to 'icons/icon.pl')
-rwxr-xr-xicons/icon.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/icons/icon.pl b/icons/icon.pl
index fcb1aa3..f5df10b 100755
--- a/icons/icon.pl
+++ b/icons/icon.pl
@@ -85,9 +85,12 @@
@dat = ();
$depth = undef;
+$convert = "convert";
foreach $_ (@ARGV) {
if (/^-(24|8|4|1)$/) {
$depth = $1;
+ } elsif (/^--convert=(.*)$/) {
+ $convert = $1;
} elsif (defined $depth) {
&readicon($_, $depth);
} else {
@@ -127,7 +130,7 @@ sub readicon {
# point, to avoid having to do it ourselves (.BMP and hence
# .ICO are bottom-up).
my $data = [];
- open IDATA, "convert -set colorspace sRGB -flip -depth 8 $filename rgba:- |";
+ open IDATA, "-|", $convert, "-set", "colorspace", "sRGB", "-flip", "-depth", "8", $filename, "rgba:-";
push @$data, $rgb while (read IDATA,$rgb,4,0) == 4;
close IDATA;
# Check we have the right amount of data.