3 # extract alpha channel
5 $(Q
)$(IM_PREFIX
)convert
$< -alpha Extract
+matte
+dither
-colors
8 $@
9 $(Q
)$(IM_PREFIX
)convert
$< -background white
-flatten
+matte
+dither
-colors
64 $@
12 %_tile.png
: %_alpha.png
%_rgb.png
13 $(Q
)$(IM_PREFIX
)montage
-tile
2x1
-geometry
+0+0 $^
-depth
8 $@
15 # Convert a raster graphic file to 8 bit BMP.
17 # Arguments: OUTFILES, OUTPATTERN, INPATTERN, [PRE_OPTIONS], [POST_OPTIONS]
20 $(1): $(2): $(3) |
$$(dir $$(firstword $(1)))/dirstamp
21 @
$$(NQ
)echo
" BMP $$@"
22 $$(Q
)$$(IM_PREFIX
)convert
$$< $(4) +dither
-compress none
-type optimize
-colors
256 $(5) bmp3
:$$@
26 # Convert a raster graphic file to 8 bit BMP with white background.
28 # Arguments: OUTFILES, OUTPATTERN, INPATTERN, [PRE_OPTIONS], [POST_OPTIONS]
29 define convert-to-bmp-white
31 $(1): $(2): $(3) |
$$(dir $$(firstword $(1)))/dirstamp
32 @
$$(NQ
)echo
" BMP $$@"
33 $$(Q
)$$(IM_PREFIX
)convert
$$< $(4) -background white
-layers flatten
+matte
+dither
-compress none
-type optimize
-colors
256 $(5) bmp3
:$$@
37 # Convert a raster graphic file to 8 bit BMP with white background.
39 # Arguments: OUTFILES, OUTPATTERN, INPATTERN, [PRE_OPTIONS], [POST_OPTIONS]
40 define convert-to-bmp-half
42 $(1): $(2): $(3) |
$$(dir $$(firstword $(1)))/dirstamp
43 @
$$(NQ
)echo
" BMP $$@"
44 @
$$(NQ
)echo
" BMP $$(@:1.bmp=2.bmp)"
45 $$(Q
)$$(IM_PREFIX
)convert
$$< $(4) -layers flatten
+matte
+dither
-compress none
-type optimize
-colors
256 -crop
'50%x100%' -scene
1 bmp3
:$$(@
:1.bmp
=%d.bmp
)