GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • script's
  • dump-icns.py
  • dump-ico.py
  • resize-on-mac.sh
  • Screenshot
  • Screenshot
  • iconify-full-package.zip
  • Unpacked content

This view

  • Original page
  • New address

GeezerVison is showing learning-python.com — iconify - Mac+Windows Icons Builder

iconify — Windows and Mac Icons from PNG Images

This is the distribution page for iconify, a Python script that uses a set of presized images to create icon files for both Windows and Mac OS, 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 Python and the Pillow (PIL) image library (available here). 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 constrained.

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 here, and also ships in their source-code package build folders.

Resources

See the items below for more about iconify.

Docs:

  • See the main script's top-of-file docstring for all usage details

Code:

  • iconify.py — the main script's source (365 lines [1.0: 114])
  • dump-icns.py — display the structure of .icns files
  • dump-ico.py — display the structure of .ico files
  • resize-on-mac.sh — presize images for use by iconify
  • resize-and-build.sh — all together now (sorry)

Examples:

  • Screenshot — Windows .ico border and exe icons
  • Screenshot — Mac OS .icns app-bundle icons

Download

Use the following to fetch iconify, or view its unzipped content.

  • iconify-full-package.zip — with all test scripts and examples
  • Unpacked content — 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 files and Mac OS .icns icon files, from presized images—and on either Windows or Macs (among others). Check out the script's main docstring for 2.0 details.

For more code examples, see the programs page.



[Home page] Books Code Blog Python Author Train Find ©M.Lutz
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.