diff options
| author | Simon Tatham <anakin@pobox.com> | 2006-12-26 22:00:11 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2006-12-26 22:00:11 +0000 |
| commit | 90e6864579d740a6df3bdbbcf3cbc42cc5181d82 (patch) | |
| tree | a120c2974b70efe6f50f62fe33ae7ac68722d5d2 /icons/square.pl | |
| parent | d55ad9fc42ab1f1d38dcf6ef02fe9254e6839165 (diff) | |
| download | puzzles-90e6864579d740a6df3bdbbcf3cbc42cc5181d82.zip puzzles-90e6864579d740a6df3bdbbcf3cbc42cc5181d82.tar.gz puzzles-90e6864579d740a6df3bdbbcf3cbc42cc5181d82.tar.bz2 puzzles-90e6864579d740a6df3bdbbcf3cbc42cc5181d82.tar.xz | |
Code to construct Windows icon files for the puzzles, by munging the
screenshots into appropriate sizes and colour depths. This is all
done with a nasty Perl script, because ImageMagick does not output
correct .ICO format. Not sure why; it isn't _that_ hard.
I intend at some point to link the resulting icons into the actual
Windows puzzle binaries, but before then I have to make them
prettier: most of them would benefit from being derived from a
smaller crop of the puzzle screenshot instead of trying to fit the
whole thing in.
[originally from svn r7017]
Diffstat (limited to 'icons/square.pl')
| -rwxr-xr-x | icons/square.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/icons/square.pl b/icons/square.pl index 295b2f1..81be9d7 100755 --- a/icons/square.pl +++ b/icons/square.pl @@ -17,13 +17,13 @@ $ident =~ /(\d+) (\d+)/ or die "unable to get size for $infile\n"; # Read the input image data. $data = []; -open IDATA, "convert $infile rgb:- |"; +open IDATA, "convert -depth 8 $infile rgb:- |"; push @$data, $rgb while (read IDATA,$rgb,3,0) == 3; close IDATA; # Check we have the right amount of data. $xl = $w * $h; $al = scalar @$data; -die "wrong amount of image data ($al, expected $xl) from $img\n" +die "wrong amount of image data ($al, expected $xl) from $infile\n" unless $al == $xl; # Find the background colour. We assume the image already has a |