Skip to main content

Extract icons from Windows EXE/DLL files and create macOS ICNS files

Project description

Exe2Iconset

Cross-platform tool to extract icons from Windows EXE/DLL files and create macOS ICNS files.

Installation

From PyPI (recommended)

pip install exe2iconset

From source

pip install .

Or install in development mode:

pip install -e .

Requirements

  • Python >= 3.10
  • Pillow >= 10.0.0
  • pefile >= 2023.2.7

Usage

GUI

Run the GUI application:

# After pip install
exe2iconset-gui

# Or with python -m
python -m exe2iconset

Or import and run:

from exe2iconset import run_gui
run_gui()

GUI Workflow

  1. Select EXE File: Click "Browse..." to select a Windows executable (EXE, DLL, MUN)
  2. Extract Icons: Click "Extract Icons" to extract icon groups from the PE file
  3. Select Series: Choose an icon series from the list in Step 2
  4. Create ICNS: Enter output name and click "Create ICNS"
  5. Save Location: ICNS file will be saved in the selected output directory

CLI

# Using the installed command
exe2iconset <file.exe> --list

# Or with python -m
python -m exe2iconset <file.exe> --list

# Create ICNS from specific group
exe2iconset <file.exe> -g icongroup_47_1033 -o output.icns

# Create ICNS with iconset directory for inspection
exe2iconset <file.exe> -o output.icns --iconset

CLI Examples

# List all icon groups in a file
exe2iconset app.exe --list

# Extract icons using the first available group
exe2iconset app.exe -o app.icns

# Extract from a specific group (shown in --list output)
exe2iconset app.exe -g icongroup_3_1033 -o myapp.icns

# Create iconset directory for manual inspection
exe2iconset app.exe -o app.icns --iconset

# Verbose output
exe2iconset app.exe -o app.icns -v

CLI Options

Option Description
-l, --list List available icon groups and exit
-g, --group GROUP Icon group to use (e.g., icongroup_3_1033)
-o, --output FILE Output ICNS file (default: appicon.icns)
--iconset Also create iconset directory
-v, --verbose Enable verbose output

Python API

from exe2iconset import extract_icons_from_pe, create_icns_from_images

# Extract icons from PE file
icon_groups = extract_icons_from_pe("app.exe")

# Create ICNS from images
create_icns_from_images(icon_images, "app.icns")

ICNS Format

The application creates ICNS files with these standard macOS icon types:

Type Size Format Notes
ic04 16×16 ARGB PackBits compressed
ic05 32×32 ARGB PackBits compressed
icp6 48×48 PNG
ic12 64×64 PNG Can serve as 32@2x retina
ic07 128×128 PNG
ic08 256×256 PNG
ic09 512×512 PNG
ic10 1024×1024 PNG Can serve as 512@2x retina

Notes on ICNS

  • ARGB format (ic04/ic05) preserves alpha channel correctly
  • PNG format is used for larger icons
  • Retina versions are handled automatically by macOS - no need to create explicit @2x variants
  • The ICNS format is flexible - only the sizes available from the source are included

For details on ICNS format, see:

Testing

Run tests with pytest:

# Install test dependencies
pip install exe2iconset[dev]

# Or install from source with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exe2iconset-0.1.1.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exe2iconset-0.1.1-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

Details for the file exe2iconset-0.1.1.tar.gz.

File metadata

  • Download URL: exe2iconset-0.1.1.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for exe2iconset-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a274208128390696f9ed1f2801ae9d15e0c1a3db92c83b1c414a5476b97f97db
MD5 451d6abf2751cdfba595fec5bb5a55f3
BLAKE2b-256 1e87595f0e022be49f05abb8df3731635337056950cd6683d555480672db8327

See more details on using hashes here.

Provenance

The following attestation bundles were made for exe2iconset-0.1.1.tar.gz:

Publisher: publish.yml on anakham/Exe2Iconset

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file exe2iconset-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: exe2iconset-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for exe2iconset-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 34f6fc5c80a854c03ed5968dfdcabccb5162884ea75bb24c86267d616cd7935e
MD5 bd522d093b47b7ae8c9963dba72d4217
BLAKE2b-256 896ab417e5c91d836fb1e293780639c541d4e7b889bb534be594f6a5983f79b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for exe2iconset-0.1.1-py3-none-any.whl:

Publisher: publish.yml on anakham/Exe2Iconset

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page