|
| 1 | +# Creating new `.ico` files |
| 2 | + |
| 3 | +This document will detail the process for creating new icon files with the |
| 4 | +file extension `.ico` using [GIMP](https://www.gimp.org/). |
| 5 | + |
| 6 | +## Step 1 (Importing the original image) |
| 7 | + |
| 8 | +The first step is to import the `.svg` file into gimp so it can be used for |
| 9 | +creating the new `.ico` file. |
| 10 | +Using a `.png` file is also a valid option, but since `.svg` files are usually |
| 11 | +scalable vector graphics file that can be scaled to any size without loosing |
| 12 | +any textures, we will be using that here. |
| 13 | +**NOTE: Once imported to GIMP upscaling the image will result in loss of quality, so only beneficial during initial import.** |
| 14 | + |
| 15 | +1. First install GIMP if you haven't already, then load the program. |
| 16 | +2. Load the `.svg` file from `File --> Open` or drag the file into the program. |
| 17 | + |
| 18 | +  |
| 19 | +3. You will the be presented with a dialog box where you can set initial Width |
| 20 | + and Height (among other values). The Width and Height should be set to the |
| 21 | + highest size that will be included in the `.ico` file. (At this time, that |
| 22 | + will be 256 for both values). |
| 23 | + |
| 24 | +  |
| 25 | + |
| 26 | +## Step 2 (Defining the different supported sizes) |
| 27 | + |
| 28 | +After you have imported the `.svg` file, you will be presented with a window |
| 29 | +showing the imported image. Make a note of the Layer section marked in the |
| 30 | +lower right corner. |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +This section is where we will define all of the sizes that should be inside |
| 35 | +the `.ico` file. |
| 36 | + |
| 37 | +1. To start of, we need to duplicate the current Layer as many to several other |
| 38 | + layers (one layer per size). *I recommend to also name the different layers with the size they are meant for. ie `128x128`, `64x64`, etc*. Layers can be renamed easily by double-clicking on the name of the layer (in the previous image, the name is icon.svg). |
| 39 | +2. To duplicate a layer, either do any of the following |
| 40 | + - Go to `Layer --> Duplicate Layer`. |
| 41 | + - Right click the current layer and select `Duplicate Layer` |
| 42 | + - Press `Ctrl+Shift+D` (Or equivalent on OSX) |
| 43 | +3. After you have duplicated to all the wanted sizes, your layer section should |
| 44 | + look something along the lines of: |
| 45 | + |
| 46 | +  |
| 47 | +4. Next comes the tedious part, you will need to go through each and every layer |
| 48 | + and scale the layer to the wanted size. |
| 49 | + This can be done in two ways. |
| 50 | + - Right-click on each layer, then select `Scale Layer...` |
| 51 | + - Or go to the menu `Layer --> Scale Layer...` |
| 52 | +5. This will pop up a dialog box where you can select the new Layer size |
| 53 | + of the layer (This **MUST** be done for every layer, except the initial one). |
| 54 | + |
| 55 | +  |
| 56 | + |
| 57 | +## Step 3 (Exporting and saving the `.ico` file) |
| 58 | + |
| 59 | +This is the last step needed, and the one that is the least painful. |
| 60 | + |
| 61 | +1. We must first open the export dialog, which can be done in two ways |
| 62 | + - Go to `File --> Export` (Or Export As) |
| 63 | + - Press `Ctrl+E` (Or `Ctrl+Shift+E` For Export As) |
| 64 | +2. This will pop up a save dialog where you can select the name and location |
| 65 | + of where to export the file. Navigate to the folder, and ensure that the Name of the file ends with a `.ico`. |
| 66 | + |
| 67 | +  |
| 68 | +3. Now you can press export, but we still ain't done yet. |
| 69 | + Another dialog will pop up, this time the actual Export dialog where you can |
| 70 | + change a few settings for each seperate icon size. (Defaults are typically fine here). |
| 71 | + |
| 72 | +  |
| 73 | +4. Change any settings (if any), then press the Export button. |
| 74 | + You are then done, and the new `.ico` file will have been created. |
0 commit comments