icoutil


Nameicoutil JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
SummarySimple Python library to create .ICO files (Windows icon file format).
upload_time2024-04-22 18:02:25
maintainerNone
docs_urlNone
authorNone
requires_python>=3
licenseMIT License
keywords windows icon .ico
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
<a href="https://github.com/oclero/icoutil">
	<img style="margin-bottom: 2em; width: 640px" src="https://raw.githubusercontent.com/oclero/icoutil/master/thumbnail.png">
</a>
</div>

# IcoUtil

[![python](https://img.shields.io/badge/Python-3.9-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://mit-license.org/)
[![PyPi version](https://badgen.net/pypi/v/icoutil/)](https://pypi.org/project/icoutil)

A simple Python library to create `.ico` files (Windows icon file format) from `.png` files.

**Table of contents**

- [Install](#install)
- [Usage](#usage)
  - [As a library](#as-a-library)
  - [As a CLI program](#as-a-cli-program)
- [Remarks](#remarks)
- [Creator](#creator)
- [License](#license)

## Install

Use the [PyPi.org](https://pypi.org/project/icoutil) package index:

```sh
pip3 install icoutil
```

## Usage

### As a library

Two ways to use the library:

- Creating a `.ico` file from a single directory that contains multiple `.png` files:

  ```py
  import icoutil

  ico = icoutil.IcoFile()
  ico.add_png_dir('path/to/dir')
  ico.write('output.ico')
  ```

- Creating a `.ico` file from multiple `.png` files:

  ```py
  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 `.ico` file from a single directory that contains multiple `.png` files:

  ```sh
  icoutil --output "icon.ico" "path/to/dir"
  ```

- Creating a `.ico` file from multiple `.png` files:

  ```sh
  icoutil --output "icon.ico" "path/to/image1.png" "path/to/image2.png" "path/to/image3.png" ...
  ```

## Remarks

- The file specification can be read [here](<https://en.wikipedia.org/wiki/ICO_(file_format)>).
- 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](mailto:oclero@pm.me) | [website](https://www.olivierclero.com) | [github](https://www.github.com/oclero) | [gitlab](https://www.gitlab.com/oclero)

## License

This project is available under the MIT license. See the [LICENSE](LICENSE) file for more info.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "icoutil",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": null,
    "keywords": "windows, icon, .ico",
    "author": null,
    "author_email": "Olivier Cl\u00e9ro <oclero@protonmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/55/6d/9065aba899e6a04402c03041674853432aca4dc2565300edf6b81a231929/icoutil-1.0.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n<a href=\"https://github.com/oclero/icoutil\">\n\t<img style=\"margin-bottom: 2em; width: 640px\" src=\"https://raw.githubusercontent.com/oclero/icoutil/master/thumbnail.png\">\n</a>\n</div>\n\n# IcoUtil\n\n[![python](https://img.shields.io/badge/Python-3.9-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://mit-license.org/)\n[![PyPi version](https://badgen.net/pypi/v/icoutil/)](https://pypi.org/project/icoutil)\n\nA simple Python library to create `.ico` files (Windows icon file format) from `.png` files.\n\n**Table of contents**\n\n- [Install](#install)\n- [Usage](#usage)\n  - [As a library](#as-a-library)\n  - [As a CLI program](#as-a-cli-program)\n- [Remarks](#remarks)\n- [Creator](#creator)\n- [License](#license)\n\n## Install\n\nUse the [PyPi.org](https://pypi.org/project/icoutil) package index:\n\n```sh\npip3 install icoutil\n```\n\n## Usage\n\n### As a library\n\nTwo ways to use the library:\n\n- Creating a `.ico` file from a single directory that contains multiple `.png` files:\n\n  ```py\n  import icoutil\n\n  ico = icoutil.IcoFile()\n  ico.add_png_dir('path/to/dir')\n  ico.write('output.ico')\n  ```\n\n- Creating a `.ico` file from multiple `.png` files:\n\n  ```py\n  import icoutil\n\n  ico = icoutil.IcoFile()\n  ico.add_png('path/to/image1.png')\n  ico.add_png('path/to/image2.png')\n  ico.add_png('path/to/image3.png')\n  ico.add_png('...')\n  ico.write('output.ico')\n  ```\n\n### As a CLI program\n\nTwo ways to use the CLI:\n\n- Creating a `.ico` file from a single directory that contains multiple `.png` files:\n\n  ```sh\n  icoutil --output \"icon.ico\" \"path/to/dir\"\n  ```\n\n- Creating a `.ico` file from multiple `.png` files:\n\n  ```sh\n  icoutil --output \"icon.ico\" \"path/to/image1.png\" \"path/to/image2.png\" \"path/to/image3.png\" ...\n  ```\n\n## Remarks\n\n- The file specification can be read [here](<https://en.wikipedia.org/wiki/ICO_(file_format)>).\n- The following sizes are used by Windows, but not all required:\n  - 16\u00d716\n  - 20\u00d720\n  - 24\u00d724\n  - 32\u00d732\n  - 40\u00d740\n  - 48\u00d748\n  - 64\u00d764\n  - 96\u00d796\n  - 128\u00d7128\n  - 256\u00d7256\n- This library won't consider sizes outside the ones specified above.\n- The maximum allowed size is 256\u00d7256 pixels.\n\n## Creator\n\n**Olivier Cl\u00e9ro** | [email](mailto:oclero@pm.me) | [website](https://www.olivierclero.com) | [github](https://www.github.com/oclero) | [gitlab](https://www.gitlab.com/oclero)\n\n## License\n\nThis project is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Simple Python library to create .ICO files (Windows icon file format).",
    "version": "1.0.2",
    "project_urls": {
        "Changelog": "https://github.com/oclero/icoutil/blob/master/CHANGELOG.md",
        "Homepage": "https://github.com/oclero/icoutil",
        "Issues": "https://github.com/oclero/icoutil/issues",
        "Repository": "https://github.com/oclero/icoutil.git"
    },
    "split_keywords": [
        "windows",
        " icon",
        " .ico"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d9a1c098420fd635c7cd16b470090c7af55239f1afdeb0ee1953933bc9355a70",
                "md5": "7f35f249828f75b5ec10107b6fac1a4b",
                "sha256": "57c4c766a603206a4471067f544bb0f11e446ebf6293dedb177a47ce32c71e05"
            },
            "downloads": -1,
            "filename": "icoutil-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7f35f249828f75b5ec10107b6fac1a4b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 7225,
            "upload_time": "2024-04-22T18:02:23",
            "upload_time_iso_8601": "2024-04-22T18:02:23.697172Z",
            "url": "https://files.pythonhosted.org/packages/d9/a1/c098420fd635c7cd16b470090c7af55239f1afdeb0ee1953933bc9355a70/icoutil-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "556d9065aba899e6a04402c03041674853432aca4dc2565300edf6b81a231929",
                "md5": "23d33353a0df18a82ecd0d82274399b9",
                "sha256": "7cc6479acc3bae8c0b71f30cb752fc3ecd3b89042147366d889c22996f9d1ad8"
            },
            "downloads": -1,
            "filename": "icoutil-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "23d33353a0df18a82ecd0d82274399b9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 7351,
            "upload_time": "2024-04-22T18:02:25",
            "upload_time_iso_8601": "2024-04-22T18:02:25.330285Z",
            "url": "https://files.pythonhosted.org/packages/55/6d/9065aba899e6a04402c03041674853432aca4dc2565300edf6b81a231929/icoutil-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-22 18:02:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "oclero",
    "github_project": "icoutil",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "icoutil"
}
        
Elapsed time: 2.73238s