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