Skip to content

Commit 093833b

Browse files
committed
Added docs for creating ico icons
1 parent 11e5a90 commit 093833b

10 files changed

+110
-1
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
# graphics
1+
# graphics
2+
3+
## Creating or updating ico files
4+
5+
See [Creating ICO Files](/GitTools/graphics/blob/master/docs/creating-ico-files.md) documentation for creating new files with `.ico` file extension,
6+
or see [Updating ICO Files](/GitTools/graphics/blob/master/docs/updating-ico-files.md) documentation for adding new higher sizes to the `.ico` files.

docs/after-initial-import.png

122 KB
Loading

docs/creating-ico-files.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
![Open a new file](open-new-file.png)
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+
![Importing SVG](importing-svg.png)
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+
![Window after import](after-initial-import.png)
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+
![Duplicated Layer section](duplicated-layer-section.png)
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+
![Scale Dialog Box](scale-dialog.png)
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+
![Savig Dialog](save-dialog.png)
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+
![Export Dialog](export-dialog.png)
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.

docs/duplicated-layer-section.png

13.7 KB
Loading

docs/export-dialog.png

34.7 KB
Loading

docs/importing-svg.png

13.8 KB
Loading

docs/open-new-file.png

4.8 KB
Loading

docs/save-dialog.png

51.4 KB
Loading

docs/scale-dialog.png

10.5 KB
Loading

docs/updating-ico-files.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Updating ICO Files
2+
3+
As with the [Creating new `.ico` files](creating-ico-files.md) documentation,
4+
this documentation will also go through the updating of `.ico` files with new
5+
sizes using [GIMP](https://www.gimp.org/).
6+
7+
## Step 1 (Loading the icon project)
8+
9+
A Gimp project file, is any file with the `.xcf` file extension.
10+
Just open this file as you would any other type, and it should load GIMP.
11+
12+
## Step 2 (Adding a new size)
13+
14+
I will assume that the size you want to add is higher than the already defined
15+
highest size in the project.
16+
If it is lower, you can Duplicate a new layer from the highest size as detailed in [Step 2 of Creating new `.ico` files](creating-ico-files.md#step-2-defining-the-different-supported-sizes).
17+
18+
1. Import the `.svg` file as a new layer. As with most other things in GIMP,
19+
this can be done in several ways. (Remember to input the desired width and height in the dialog that will be shown)
20+
- Go to menu `File --> Open as layer...`
21+
- Press `Ctrl+Alt+O`
22+
- Drag `.svg` file onto GIMP.
23+
2. This will put the import the image as a new layer, but without updating the
24+
Canvas size. This must be done.
25+
3. Go to the menu `Image --> Fit Canvas to Layers`.
26+
4. You may have noticed in the Layer section, that new layer may have been
27+
put in the wrong order. While it should not really matter, you can fix that
28+
by just dragging the layer to the desired location.
29+
30+
Now that this is done, you can now follow [Step 3 of Creating new `.ico` files](creating-ico-files.md#step-3-exporting-and-saving-the-ico-file) for exporting the updated `.ico` file.

0 commit comments

Comments
 (0)