iconify — Windows and Mac Icons from PNG Images
This is the distribution page for iconify, a Python
that uses a set of presized images to create icon files for both
and
, and can be run on either platform, as well as Linux, Android, and others. With iconify, you can make Windows icons on a Mac, and vice versa.
Overview
This Python 3.X/2.X command-line program creates both .ico Windows-style and .icns Mac OS-style icon files from presized image files in a folder. The icons it makes can be used in GUIs, apps, and other contexts.
iconify requires
and the Pillow (PIL) image library (available
). You can run this program to make Mac and Windows icons on any platform supported by both Python and Pillow, including Mac OS, Windows, and Linux. iconify also works in Android and iOS apps that provide Python, Pillow, and a shell command line, though folder access may be
.
Beyond its utility, iconify also demonstrates low-level binary data processing with Python's struct module. It's used to build icons of all the major programs
, and also ships in their source-code package build folders.
Resources
See the items below for more about iconify. Docs:
See the main
top-of-file docstring for all usage details
Code:
— the main script's source (365 lines [1.0: 114])
— display the structure of .icns files
— display the structure of .ico files
— presize images for use by iconify
— all together now (sorry)
Examples:
— Windows .ico border and exe icons
— Mac OS .icns app-bundle icons
Download
Use the following to fetch iconify, or view its unzipped content.
— with all test scripts and examples
— zipfile content online
This program was last changed: May 2017. It was patched trivially in December 2024 to avoid a new string-escape error in Python 3.13.
Recent upgrades: as of 2017, iconify 2.0 can create both Windows .ico icon
and Mac OS .icns icon
, from presized images—and on either Windows or Macs (among others). Check out the
main docstring for 2.0 details.
For more code examples, see the
page.