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
icOnchunk
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 = classic_to_image(obj.classic.normal, palette=WB_1X, indexed=True) # "P" mode
img = to_image(obj, selected=True)
Create a classic icon from images:
from PIL import Image
from amigainfo import IconType, WB_1X, image_to_classic, new_disk_object, save, set_classic_images
obj = new_disk_object(IconType.TOOL, palette=WB_1X) # user_data=0: an OS 1.x icon
normal = image_to_classic(Image.open("normal.png"), WB_1X)
selected = image_to_classic(Image.open("selected.png"), WB_1X)
set_classic_images(obj, normal, selected) # sizes the gadget, sets highlight flags
obj.default_tool = "SYS:Utilities/MultiView"
open("MyApp.info", "wb").write(save(obj))
image_to_classic treats transparent pixels as colour 0 and requires every
other pixel to be a palette colour. It raises PaletteError otherwise, or
snaps to the nearest colour with force=True. An indexed image whose palette
starts with the Workbench palette has its indices used directly.
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
Classic icons are written as indexed PNGs with the Workbench palette and colour 0 transparent, so a paint program keeps the palette and the image can go straight back into an icon.
Create a classic icon from an image (any input that isn't a .info):
amigainfo -o MyApp.info --palette wb1x --type tool \
--default-tool SYS:Utilities/MultiView --tooltype DONOTWAIT --stack 8192 \
normal.png --selected-image selected.png
Every pixel must be a colour from the palette (or transparent, for colour 0).
Otherwise it fails and reports where; --force snaps to the nearest colour.
--palette also sets the icon's OS version: wb1x makes an OS 1.x icon,
wb2x (the default) an OS 2.x+ one.
Edit an existing icon. -o can be the input file to edit it in place:
# Replace the classic images, keeping everything else
amigainfo -o MyApp.info --image edited.png --selected-image edited_sel.png MyApp.info
# Drop the selected image; Workbench inverts the colours instead
amigainfo -o MyApp.info --no-selected-image MyApp.info
# Metadata
amigainfo -o MyApp.info --type project --default-tool SYS:C/Ed --stack 16384 MyApp.info
amigainfo -o MyApp.info --default-tool "" MyApp.info # remove it
# ToolTypes: --tooltype replaces an entry with the same KEY= or appends
amigainfo -o MyApp.info --tooltype PUBSCREEN=Workbench --remove-tooltype DONOTWAIT MyApp.info
amigainfo -o MyApp.info --clear-tooltypes --tooltype CX_PRIORITY=0 MyApp.info
NewIcon image data in the ToolTypes is kept through ToolType edits. If the
icon also has NewIcon, GlowIcon, ARGB or PNG images, Workbench shows those
instead of the classic one; --strip-newer removes them.
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.
Metadata
Release files for amigainfo 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| amigainfo-0.7.0.tar.gz | 28.6 kB | Without provenance | Details for amigainfo-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| amigainfo-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for amigainfo-0.7.0-py3-none-any.whl |
Total release size: 59.5 kB
Release files / amigainfo-0.7.0.tar.gz
| Download URL | amigainfo-0.7.0.tar.gz |
|---|---|
| Size | 28.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3360961e7e3df7e49203910011ad21d81f1eee1c21c9a4c529ef0c9b67fd688
|
|
BLAKE2b-256 checksum How to use checksums |
e2048341d7a872adc027bd9159457d0425574b6980d9b34faedb6907203a50b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Release files / amigainfo-0.7.0-py3-none-any.whl
| Download URL | amigainfo-0.7.0-py3-none-any.whl |
|---|---|
| Size | 30.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b8661699fc3cfdb2f3d6094047dfc2da6c7e458d4709b6c237d5d0360df0084
|
|
BLAKE2b-256 checksum How to use checksums |
912d135e02426a435dccf0ee4771924d02fb2e4eb53b46a8a9ca5bc1e02f8010
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Security for amigainfo 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.