# Makefile for Puzzles icons.
-PUZZLES = blackbox bridges cube dominosa fifteen filling flip galaxies \
- guess inertia keen lightup loopy magnets map mines net \
- netslide pattern pearl pegs range rect samegame signpost \
- singles sixteen slant solo tents towers twiddle undead \
- unequal unruly untangle
+PUZZLES = blackbox bridges cube dominosa fifteen filling flip flood \
+ galaxies guess inertia keen lightup loopy magnets map mines \
+ net netslide palisade pattern pearl pegs range rect \
+ samegame signpost singles sixteen slant solo tents towers \
+ twiddle tracks undead unequal unruly untangle
BASE = $(patsubst %,%-base.png,$(PUZZLES))
WEB = $(patsubst %,%-web.png,$(PUZZLES))
BIN = ../
PIC = ./
+# Work around newer ImageMagick unilaterally distorting colours when
+# converting to PNG.
+CSP = -set colorspace RGB
+
base: $(BASE)
web: $(WEB)
pngicons: $(P48D24) $(P32D24) $(P16D24)
mines-ibase.png : override CROP=240x240 110x110+130+130
net-ibase.png : override CROP=193x193 113x113+0+80
netslide-ibase.png : override CROP=289x289 144x144+0+0
+palisade-ibase.png : override CROP=288x288 192x192+0+0
pattern-ibase.png : override CROP=384x384 223x223+0+0
pearl-ibase.png : override CROP=216x216 94x94+108+15
pegs-ibase.png : override CROP=263x263 147x147+116+0
solo-ibase.png : override CROP=481x481 145x145+24+24
tents-ibase.png : override CROP=320x320 165x165+142+0
towers-ibase.png : override CROP=300x300 102x102+151+6
+tracks-ibase.png : override CROP=246x246 118x118+6+6
twiddle-ibase.png : override CROP=192x192 102x102+69+21
-undead-ibase.png : override CROP=448x512 192x192+32+96
+undead-ibase.png : override CROP=416x480 192x192+16+80
unequal-ibase.png : override CROP=208x208 104x104+104+104
untangle-ibase.png : override CROP=320x320 164x164+3+116
$(IBASE): %-ibase.png: %-base.png
# seems to work better than reducing it in 24 bits and then
# dithering.
$(IBASE4): %-ibase4.png: %-ibase.png
- convert -colors 16 +dither -map $(PIC)win16pal.xpm $^ $@
+ convert -colors 16 +dither $(CSP) -map $(PIC)win16pal.xpm $^ $@
# Build the 24-bit PNGs for the icons, at three sizes.
$(P48D24): %-48d24.png: %-ibase.png
# much...)
$(P48D4): %-48d4.png: %-ibase4.png
$(PIC)square.pl 48 1 $^ $@-tmp2.png
- convert -colors 16 -map $(PIC)win16pal.xpm $@-tmp2.png $@
+ convert -colors 16 $(CSP) -map $(PIC)win16pal.xpm $@-tmp2.png $@
rm -f $@-tmp2.png
$(P32D4): %-32d4.png: %-ibase.png
$(PIC)square.pl 32 1 $^ $@-tmp2.png
- convert -colors 16 -map $(PIC)win16pal.xpm $@-tmp2.png $@
+ convert -colors 16 $(CSP) -map $(PIC)win16pal.xpm $@-tmp2.png $@
rm -f $@-tmp2.png
$(P16D4): %-16d4.png: %-ibase.png
$(PIC)square.pl 16 1 $^ $@-tmp2.png
- convert -colors 16 -map $(PIC)win16pal.xpm $@-tmp2.png $@
+ convert -colors 16 $(CSP) -map $(PIC)win16pal.xpm $@-tmp2.png $@
rm -f $@-tmp2.png
# Build the actual Windows icons themselves, by feeding all those