Make Windows Icons
This script resizes a given image to various sizes and creates a set of icons for a Windows application. The generated icons are saved in PNG format, and an ICO file is created that packs all the icons together.
Features
- Resize a single source image to multiple sizes.
- Save the resized images in PNG format.
- Create an ICO file containing all the resized icons.
- Optionally, specify additional sizes to resize the image to.
Requirements
- Python 3.10+
Installation
- Install with pip:
python3 -m pip install makewindowsicons
Usage
python3 -m makewindowsicons -i <input_image> -a <app_name> [-o <output_directory>] [--no_dir] [-s <size>]...
Arguments
-i <input_image>,--input_image <input_image>: Path to the source image.
Options
-a <app_name>,--app_name <app_name>: Name of the application. Default is 'app'.-o <output_directory>,--output_dir <output_directory>: Directory to save the output resources. Default is the current directory.-n,--no_dir: Do not create a 'resources' directory; save images directly to the specified output directory.-s <size>,--size <size>: Optional additional sizes to resize the image to. Can be specified multiple times. Sizes over 256px will be ignored, as this is the largest size supported by Windows for .ICO files.
Examples
-
Default behavior:
Resize the image to the default sizes and save in the
resourcesdirectory within the current directory:python3 -m makewindowsicons -i your_source_image.png -a YourAppName
-
Specify output directory:
Resize the image to the default sizes and save in the
resourcesdirectory within the specified output directory:python3 -m makewindowsicons -i your_source_image.png -a YourAppName -o output_path
-
Without creating
resourcesdirectory:Resize the image to the default sizes and save directly in the specified output directory:
python3 -m makewindowsicons -i your_source_image.png -a YourAppName -o output_path -n
-
Add additional sizes:
Resize the image to the default sizes plus additional sizes (e.g., 37px, 69px) and save in the
resourcesdirectory within the specified output directory:python3 -m makewindowsicons -i your_source_image.png -a YourAppName -o output_path -s 42 -s 69 -s 77
Contributing
Feel free to submit issues or pull requests if you find any bugs or have suggestions for improvements.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for makewindowsicons 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| makewindowsicons-0.2.0.tar.gz | 4.9 kB | Without provenance | Details for makewindowsicons-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| makewindowsicons-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for makewindowsicons-0.2.0-py3-none-any.whl |
Total release size: 10.9 kB
Release files / makewindowsicons-0.2.0.tar.gz
| Download URL | makewindowsicons-0.2.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aeba8be57feffb9a15d004c113d82eebb001f58e024d4dcdf73360b4624abb94
|
|
BLAKE2b-256 checksum How to use checksums |
3186f2777c7f6571291144b76539b7938c2a848e89536b8d0df7a9b7b60ff5e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Release files / makewindowsicons-0.2.0-py3-none-any.whl
| Download URL | makewindowsicons-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
879e43182455c268db665038760cfbf5c9ab4825ed06fca9476848eaae8b7d7f
|
|
BLAKE2b-256 checksum How to use checksums |
fb45b43fa8cb39c375916e132f9ac129688ea86f19735e3f403232aa20e8f88d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Security for makewindowsicons 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.