You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,14 @@
3
3
All major and minor version changes will be documented in this file. Details of
4
4
patch-level version changes can be found in [commit messages](../../commits/master).
5
5
6
+
## 2024.2 - 2024/09/15
7
+
8
+
- support means of image preprocessing through a `resize_method` option. It can take one of the following values:
9
+
- **"outerCrop"**: Resizes the image to fit within the target dimensions while preserving its original aspect ratio. Any space left over is filled with black bars (letterboxing), if applicable.
10
+
- **"innerCrop"**: Resizes the image by cropping parts of it to fit the target dimensions
11
+
- **"stretch"**: Stretches the image to fit the target dimensions exactly, ignoring the original aspect ratio, which can lead to distortion.
Copy file name to clipboardExpand all lines: documentation/tutorials/README.md
+46-27Lines changed: 46 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
2
2
# **Tutorial: Generating Nintendo Switch Themes with `nxtheme-creator`**
3
3
4
-
This tutorial will guide you through using the `nxtheme-creator` tool to generate custom themes for your Nintendo Switch. Follow these steps to create multiple themes from images (with optional configuration for layouts)
4
+
This tutorial will guide you through using the `nxtheme-creator` tool to generate custom themes for
5
+
your Nintendo Switch. Follow these steps to create multiple themes from images (with optional
6
+
configuration for layouts)
5
7
6
8
## **Step 1: Install `nxtheme-creator`**
7
9
@@ -13,7 +15,8 @@ python3 -m pip install
13
15
14
16
## **Step 2: Prepare Your Images**
15
17
16
-
**Create an Input Directory**: Organize your images in a directory. The directory structure should look like this:
18
+
**Create an Input Directory**: Organize your images in a directory. The directory structure should
19
+
look like this:
17
20
18
21
```sh
19
22
themes_directory/
@@ -28,20 +31,17 @@ themes_directory/
28
31
│ ├── home,lock.jpg
29
32
│ ├── apps,set,user.jpg
30
33
│ └── news.jpg
31
-
└── theme3/
32
-
├── home.jpg
33
-
├── lock.jpg
34
-
├── apps.jpg
35
-
├── set.jpg
36
-
├── user.jpg
37
-
└── news.jpg
34
+
└── theme3.jpg
35
+
38
36
```
39
37
40
-
Each image file should correspond to a different part of the theme (home screen, lock screen, etc.). But note these may be combined with a comma as shown above to apply one image to multiple parts of the UI
38
+
Each image file should correspond to a different part of the theme (home screen, lock screen, etc.).
39
+
These may be combined with a comma as shown above to apply one image to multiple parts of the UI.
40
+
Alternatively one image e.g. `theme3.jpg` may be used to create all parts of a theme.
41
41
42
42
## **Step 3: \[Optional] Configure the `conf.json` File**
43
43
44
-
Create or modify a `conf.json` file in the root directory of `nxtheme-creator`. This file will specify how the tool should process your images. Here’s an example configuration:
44
+
Create a `conf.json` file in the root directory of `nxtheme-creator`. This file will specify how the tool should process your images. Here’s an example configuration:
45
45
46
46
```json
47
47
{
@@ -51,16 +51,37 @@ Create or modify a `conf.json` file in the root directory of `nxtheme-creator`.
51
51
"set": null,
52
52
"user": null,
53
53
"news": null,
54
-
"author_name": "JohnDoe"
54
+
"author_name": "JohnDoe",
55
+
"resize_method": "outerCrop"
55
56
}
56
-
57
57
```
58
58
59
-
Note that items ["home", "lock", "apps", "set", "user", "news"] are configured with the layout file, `.json` may be omitted from the file end, also note that if the file does not exist locally, we fallback to the copy included with `SwitchThemes.exe` if available. If not found, an error is returned
| home | "DogeLayoutRounded" |\[optional] Path to the layout.json for the home screen or a preset layout, e.g. the "DogeLayoutRounded" provided by nxtheme-creator |
62
+
| lock | null |\[optional] Path to the layout.json for the lock screen |
63
+
| apps | null |\[optional] Path to the layout.json for the apps screen |
64
+
| set | null |\[optional] Path to the layout.json for the settings screen |
65
+
| user | null |\[optional] Path to the layout.json for the user section |
66
+
| news | null |\[optional] Path to the layout.json for the news section |
67
+
| author_name | "JohnDoe" | Name of the author |
68
+
| resize_method | "outerCrop" |\[optional] The method used for image resizing. One of \["outerCrop", "innerCrop", "stretch", null]|
69
+
70
+
Note that items ["home", "lock", "apps", "set", "user", "news"] are configured with a layout file,
71
+
`.json` may be omitted from the file end. Also note that if the path does not exist, we use to the
72
+
copy included with either the `SwitchThemes.exe`, or the `nxtheme-creator` backend if available.
73
+
If not found, an error is returned
74
+
75
+
The `resize_method` option defines how an image is resized. It can take one of the following values:
76
+
77
+
-**"outerCrop"**: Resizes the image to fit within the target dimensions while preserving its original aspect ratio. Any space left over is filled with black bars (letterboxing), if applicable.
78
+
-**"innerCrop"**: Resizes the image by cropping parts of it to fit the target dimensions
79
+
-**"stretch"**: Stretches the image to fit the target dimensions exactly, ignoring the original aspect ratio, which can lead to distortion.
80
+
-**null**: No resizing method is applied.
60
81
61
82
## **Step 4: Run the Tool**
62
83
63
-
### **Using the Command Line**
84
+
### **With the SwitchThemes.exe backend**
64
85
65
86
Open your terminal or command prompt and run the following command to generate your theme:
66
87
@@ -75,26 +96,24 @@ Replace:
75
96
-`output_directory` with the directory where you want to save the generated theme files.This defaults to `./output/`
76
97
-`conf.json` with the path to your configuration file. Note this is optional, though needed if you wish to customise the layouts or set an `author_name`
77
98
78
-
### **Example Command**
79
-
80
-
Assuming you have the following setup:
99
+
### **With the nxtheme-creator backend**
81
100
82
-
-`SwitchThemes.exe` located at `/path/to/SwitchThemes.exe`
83
-
- Input directory is `./input_images`
84
-
- Output directory is `./themes`
85
-
- Configuration file is `./conf.json`
86
-
87
-
Run the command:
101
+
Open your terminal or command prompt and run the following command to generate your theme:
-`input_directory` with the path to your images. This defaults to the directory you run `nxtheme-creator` from
110
+
-`output_directory` with the directory where you want to save the generated theme files.This defaults to `./output/`
111
+
-`conf.json` with the path to your configuration file. Note this is optional, though needed if you wish to customise the layouts or set an `author_name`
112
+
93
113
## **Step 5: Verify and Install Your Theme**
94
114
95
115
1.**Check the Output Directory**: After running the command, check the `output_directory` for the generated theme files (`.nxtheme` files).
96
-
97
-
2.**Install the Theme**: Follow your preferred method to install the generated theme on your Nintendo Switch. Typically, you would use an NXTheme installer or similar tool to apply the theme.
116
+
2.**Install the Theme**: Follow your preferred method to install the generated theme on your Nintendo Switch. Typically, you would use an NXTheme installer or similar tool to apply the theme. For example, https://github.com/exelix11/SwitchThemeInjector
0 commit comments