IcoUtil
A simple Python library to create .ico files (Windows icon file format) from .png files.
Table of contents
Install
Use the PyPi.org package index:
pip3 install icoutil
Usage
As a library
Two ways to use the library:
-
Creating a
.icofile from a single directory that contains multiple.pngfiles:import icoutil ico = icoutil.IcoFile() ico.add_png_dir('path/to/dir') ico.write('output.ico')
-
Creating a
.icofile from multiple.pngfiles:import icoutil ico = icoutil.IcoFile() ico.add_png('path/to/image1.png') ico.add_png('path/to/image2.png') ico.add_png('path/to/image3.png') ico.add_png('...') ico.write('output.ico')
As a CLI program
Two ways to use the CLI:
-
Creating a
.icofile from a single directory that contains multiple.pngfiles:icoutil --output "icon.ico" "path/to/dir"
-
Creating a
.icofile from multiple.pngfiles:icoutil --output "icon.ico" "path/to/image1.png" "path/to/image2.png" "path/to/image3.png" ...
Remarks
- The file specification can be read here.
- The following sizes are used by Windows, but not all required:
- 16×16
- 20×20
- 24×24
- 32×32
- 40×40
- 48×48
- 64×64
- 96×96
- 128×128
- 256×256
- This library won't consider sizes outside the ones specified above.
- The maximum allowed size is 256×256 pixels.
Creator
Olivier Cléro | email | website | github | gitlab
License
This project is available under the MIT license. See the LICENSE file for more info.
Metadata
Release files for icoutil 1.0.2
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 |
|---|---|---|---|---|
| icoutil-1.0.2.tar.gz | 7.4 kB | Without provenance | Details for icoutil-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| icoutil-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for icoutil-1.0.2-py3-none-any.whl |
Total release size: 14.6 kB
Release files / icoutil-1.0.2.tar.gz
| Download URL | icoutil-1.0.2.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7cc6479acc3bae8c0b71f30cb752fc3ecd3b89042147366d889c22996f9d1ad8
|
|
BLAKE2b-256 checksum How to use checksums |
556d9065aba899e6a04402c03041674853432aca4dc2565300edf6b81a231929
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / icoutil-1.0.2-py3-none-any.whl
| Download URL | icoutil-1.0.2-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57c4c766a603206a4471067f544bb0f11e446ebf6293dedb177a47ce32c71e05
|
|
BLAKE2b-256 checksum How to use checksums |
d9a1c098420fd635c7cd16b470090c7af55239f1afdeb0ee1953933bc9355a70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for icoutil 1.0.2
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.