Skip to main content

amigainfo

A Python library for loading, saving and converting Amiga .info icon files.

Supports five generations of the format:

  • 🗺️ Classic (OS 1.x-3.1) — planar bitmap icons
  • 🖼️ NewIcons — higher colour icons encoded in ToolTypes strings
  • 🪟 GlowIcons / ColorIcons (OS 3.5+) — IFF FORM ICON with RLE compression
  • 📷 ARGB (OS4) — 32-bit icons with zlib-compressed ARGB data
  • 🖼️ PowerIcons (OS4) — two concatenated PNG files with metadata in an icOn chunk

Links

Install

pip install amigainfo

Library usage

from amigainfo import load, save, to_image

# Load and render the best available image
obj = load(open("MyApp.info", "rb").read())
img = to_image(obj)
img.save("MyApp.png")

# Access metadata
print(obj.type)          # IconType.TOOL
print(obj.default_tool)  # "SYS:Utilities/MultiView"
print(obj.tooltypes)     # ["PUBSCREEN=Workbench", ...]

# Modify and save back
obj.default_tool = "SYS:Utilities/NewTool"
obj.tooltypes.append("DONOTWAIT")
open("MyApp.info", "wb").write(save(obj))

# Render a specific format or state
from amigainfo import classic_to_image, WB_1X

img = classic_to_image(obj.classic.normal, palette=WB_1X)
img = to_image(obj, selected=True)

CLI

Inspect .info files (default):

# Human-readable summary (default action)
amigainfo icon.info

# Multiple files
amigainfo *.info

# JSON metadata
amigainfo --json icon.info

Convert to PNG with -o:

# Convert to PNG (picks the best available image format)
amigainfo -o icon.png icon.info

# Batch convert to a directory
amigainfo -o output_dir/ *.info

# Use the selected (highlighted) icon state
amigainfo -o icon.png --selected icon.info

# Extract a specific format layer
amigainfo -o icon.png --format classic icon.info
amigainfo -o icon.png --format newicon icon.info
amigainfo -o icon.png --format coloricon icon.info
amigainfo -o icon.png --format argb icon.info
amigainfo -o icon.png --format png icon.info

# Override the palette for classic icons
amigainfo -o icon.png --format classic --palette wb1x icon.info

Pillow plugin

import amigainfo registers a Pillow plugin, so you can open .info files directly:

from PIL import Image
import amigainfo

img = Image.open("icon.info")
img.save("icon.png")

# Multi-frame: all generations × states, best first
for i in range(img.n_frames):
    img.seek(i)
    img.save(f"frame_{i}.png")

# Full DiskObject metadata is available
obj = img.info["disk_object"]
print(obj.tooltypes)

Format overview

Amiga .info files are icon files used by AmigaOS Workbench. The format evolved over several OS generations, with each new format layered on top of the previous for backward compatibility.

Every standard .info file starts with a DiskObject header (0xE310 magic) containing a Gadget structure, icon metadata (type, position, tooltypes, default tool), and planar bitmap image data. Later formats append additional image data:

Format Era Image type Palette
Classic OS 1.x-3.1 Planar bitmaps (1-8 bitplanes) System Workbench palette
NewIcons Mid-90s Chunky pixels encoded in ToolTypes Embedded in data
GlowIcons OS 3.5+ RLE-compressed indexed colour (IFF) Embedded in data
ARGB OS 4 zlib-compressed 32-bit ARGB Full colour
PowerIcons OS 4 Two concatenated PNGs Full colour

PowerIconss icons are a separate format — the file starts with PNG magic (0x89504E47) instead of 0xE310. Two complete PNG images are concatenated back-to-back (normal + selected state), and icon metadata is stored in a custom icOn PNG chunk in the first image.

Each file can contain up to two images: normal and selected states.

Data model

The load() function returns a DiskObject with all parsed data accessible. The save() function serializes it back to .info bytes:

DiskObject
├── magic, version, type
├── gadget (Gadget: dimensions, flags, user_data)
├── default_tool, tool_window, tooltypes
├── current_x, current_y, stack_size
├── drawer_data (DrawerData: window state, OS2+ display flags)
├── classic (ClassicImages: normal/selected planar bitmaps)
├── newicon (NewIconImages: normal/selected palette+pixels)
├── coloricon (ColorIconImages: FACE chunk + normal/selected IMAG)
├── argb (ARGBImages: normal/selected 32-bit image data)
└── png (PNGImages: normal/selected raw PNG bytes)

Default palettes

Classic icons don't store palette data, they rely on the system Workbench palette. Two palettes are included:

  • WB_1X — OS 1.x, 4 colours (blue, white, black, orange)
  • WB_2X — OS 2.x/3.x, 8 colours (the standard Workbench palette)

The default is WB_2X. The to_image() function auto-selects based on gadget.user_data (OS 2.x+ icons set this to 1).

License

WTFPL: do whatever you want, but don't blame me if it unplumps your gf's pillow.

Download files

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

Source Distribution

amigainfo-0.6.1.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

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

amigainfo-0.6.1-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file amigainfo-0.6.1.tar.gz.

File metadata

  • Download URL: amigainfo-0.6.1.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.21

File hashes

Hashes for amigainfo-0.6.1.tar.gz
Algorithm Hash digest
SHA256 fada4103a26695fa0b8c9882e26ea25efcb64396e295761fca89dba25274588b
MD5 dfde4f192820d2dd4c5179b6cc04dca8
BLAKE2b-256 d0bee31eb02beee7f6256dde727882a6b9bf2ccbd1feb6c9244cef7a3dcb296c

See more details on using hashes here.

File details

Details for the file amigainfo-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: amigainfo-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.21

File hashes

Hashes for amigainfo-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8f21a26363c8936ceb636e19e1b0086e3353e82bbe0c26b14ae43575f76aa49
MD5 fd2d1fd7f058bc2c5b7fcc9f0f50d052
BLAKE2b-256 ad8a8867c0b8cd145211c205ee937c0ec1f56819db3b509127fba9f819c330c5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 files

0.6.0

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page