amos-abk
A Python library for loading AMOS .abk bank files from the Amiga.
Parses the container format and three image bank types:
- Sprites — hardware sprite images with hotspot and transparency
- Icons — software bob images (same format as sprites)
- Pac.Pic. — packed full-screen pictures with three-stream RLE compression
Non-image banks (Music, Samples, Amal, Datas) are loaded as raw DataBank
objects.
Binary stream inputs are consumed from their current position through EOF; they do not need to support seeking. Caller-owned streams remain open.
Pac.Pic. colour conversion supports indexed screens and six-plane Extra
Half-Brite (EHB). HAM, dual-playfield, and other unsupported high-depth modes
raise ValueError during RGB/RGBA conversion (OSError through Pillow).
Their raw bitplanes and indexed values remain available for custom decoding.
Sprite and icon colour conversion supports up to five bitplanes (32 colours).
Higher-depth images retain raw/indexed access but reject colour conversion:
these banks do not store the screen mode needed to interpret those colours.
Links
Install
pip install amos-abk
Library usage
from amos_abk import load, parse_sprites, parse_packed_picture
# Load a bank file
abk = load("sprites.abk")
print(abk) # AbkFile([Sprites])
# Parse sprites and convert to PIL Images
sprites = parse_sprites(abk.banks[0].data)
for i, sprite in enumerate(sprites):
sprite.to_image().save(f"sprite_{i}.png")
# Parse a packed picture
abk = load("picture.abk")
pic = parse_packed_picture(abk.banks[0].data)
pic.to_image().save("picture.png")
# Access raw data
print(pic.width, pic.height, pic.num_planes)
print(pic.palette[:4]) # first 4 RGB tuples
Pillow plugin
import amos_abk registers a Pillow plugin, so you can open .abk files
directly:
from PIL import Image
import amos_abk
img = Image.open("sprites.abk")
img.save("first_sprite.png")
# Multi-frame: seek through all images in the file
for i in range(img.n_frames):
img.seek(i)
img.save(f"frame_{i}.png")
# The parsed AbkFile is available in metadata
abk = img.info["abk"]
print(abk.banks[0].name)
Extract all images
The images() function extracts every image from every bank in a file:
import amos_abk
# From a file path
imgs = amos_abk.images("sprites.abk")
for i, img in enumerate(imgs):
img.save(f"image_{i}.png")
# Or from an already-loaded AbkFile
abk = amos_abk.load("sprites.abk")
imgs = amos_abk.images(abk)
Format overview
AMOS was a game-creation environment for the Amiga, released in 1990. It stored
graphics and other resources in .abk memory bank files.
Bank container
Each .abk file contains one or more banks, either bare (AmSp/AmIc magic) or
wrapped in an AmBk header with a bank number, name, and memory type. Bank sets
(AmBs magic, usually .abs files) hold a count followed by any mix of these.
Sprite and icon banks
Sprites and icons share the same format: a count, per-image headers (dimensions, bitplane count, hotspot), interleaved planar bitmap data, and a shared 32-entry 12-bit Amiga palette.
Pac.Pic. banks
Packed pictures are compressed full-screen Amiga images. They have two layers:
- Screen header (magic
0x12031990) — dimensions, display window, flags, and palette - Packed bitmap (magic
0x06071963) — three-stream RLE compression where POINTS controls RLEDATA, and RLEDATA controls PICDATA
License
WTFPL: do as you like, but don't blame me if it banks your sprites.
Metadata
Release files for amos-abk 0.2.2
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 |
|---|---|---|---|---|
| amos_abk-0.2.2.tar.gz | 12.6 kB | Without provenance | Details for amos_abk-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| amos_abk-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for amos_abk-0.2.2-py3-none-any.whl |
Total release size: 26.8 kB
Release files / amos_abk-0.2.2.tar.gz
| Download URL | amos_abk-0.2.2.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee52e88f880389a02e1623040cf787437e9e349d0ea4514ba86f3a85703d423d
|
|
BLAKE2b-256 checksum How to use checksums |
c41590fe279456e7cca6c2169094491a746734de7a81662e25718c3774e8331d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Release files / amos_abk-0.2.2-py3-none-any.whl
| Download URL | amos_abk-0.2.2-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe73c5c9c2db80aaf6485274d912599177166a518c91ca9987e772decfea458c
|
|
BLAKE2b-256 checksum How to use checksums |
6a221105b169211cd539ef21e84b3a5716e640240b1fdfead8557911a469ec93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Security for amos-abk 0.2.2
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.