README
1PNG Images
2==========
3
4Please run src/tools/resources/optimize-png-files.sh on all new icons. For example:
5 tools/resources/optimize-png-files.sh -o2 new_pngs_dir
6
7If this script does not work for some reason, at least pngcrush the files:
8 mkdir crushed
9 pngcrush -d crushed -brute -reduce -rem alla new/*.png
10
11ICO Images
12==========
13
14Windows ICO icons should be in the following format:
15
16* A square image of each size: 256, 48, 32, 16.
17* The 256 image should be in PNG format, and optimized.
18* The smaller images should be in BMP (uncompressed) format.
19* Each of the smaller images (48 and less) should have an 8-bit and 32-bit
20 version.
21* The 256 image should not be last (there is a bug in Gnome on Linux where icons
22 look corrupted if the PNG image is last).
23
24If you are creating an ICO from a set of PNGs of different sizes, the following
25process (using ImageMagick and GIMP) satisfies the above conditions:
26
271. Convert each of the smaller images to 8-bit. With ImageMagick:
28
29 for f in FILENAME-??.png; \
30 do convert $f -dither None -colors 256 \
31 png8:`basename $f .png`-indexed.png; \
32 done
33
342. Combine the images into an ICO file. With ImageMagick:
35
36 convert FILENAME-256.png FILENAME-{48,32,16}{-indexed,}.png FILENAME.ico
37
383. Unfortunately, the 8-bit images have been converted back into 32-bit images.
39 Open the icon in GIMP and re-export it. This will also convert the large
40 256 image into a compressed PNG.
414. Run src/tools/resources/optimize-ico-files.py on the resulting .ico file.
42
43You can also run src/tools/resources/optimize-ico-files.py on existing .ico
44files. This will convert BMPs to PNGs and run a basic PNG optimization pass, as
45well as fix up any broken image masks (http://crbug.com/534679).
46