2 # Export several areas in keyboard.svg to optimized PNG.
3 # Dependencies: Inkscape, pngcrush.
5 # IDs of target area rectangles in keyboard.svg:
10 white_bright_on_orange
29 inkscape keyboard.svg
--export-id=$ID --export-png=$ID.png
32 # Optimize opaque images and remove their alpha channels.
33 # pngcrush will not overwrite input files, so use a temp dir
34 # and move/overwrite files afterwards.
35 # pngcrush creates the dir given for -d, if necessary.
36 pngcrush
-c 2 -reduce -d crushed white_
*.png
38 # Optimize transparent images, keeping their alpha channels:
39 pngcrush
-c 6 -reduce -d crushed black_
*.png