Skip to main content

pyrecoil

pyrecoil provides Python bindings to RECOIL, the Retro Computer Image Library, allowing you to open over 500 image file formats from retro computers.

Installation

pip install pyrecoil

pyrecoil is most useful when installed in conjunction with Pillow, the active fork of the Python Image Library:

pip install Pillow

Usage

from recoil import RecoilImage

# load image from disk and decode it:
img = RecoilImage("foo.lbm")

# load image from an existing file handle:
# (filename must still be provided, as a hint to the decoder)
img = RecoilImage("foo.lbm", f)

# inspecting properties:
img.colors  # number of colors used in the image
> 16

img.frames  # number of alternating frames (used for 'interlace' / 'gigascreen' effects)
> 1

img.size  # return a tuple of (width, height)
> (320, 200)

img.original_size  # for images that have been resized to account for non-square pixels
> (320, 200)

img.platform
> 'Amiga'

# Retrieving pixel data -
# returns a bytearray consisting of three bytes (r, g, b) for each pixel,
# in left-to-right, top-to-bottom order
pixels = img.get_pixels()

# convert to a PIL / Pillow image object:
pil_image = img.to_pil()
pil_image.save('foo.png')

Build notes

The RECOIL library itself is implemented in the Fusion Programming Language. For ease of distribution, the generated C output (recoil.c and recoil.h) from the fut transpiler is included in the package - this, along with recoil_interface.c, forms the Python extension module.

Author

Matt Westcott - matt@west.co.tt, https://icosahedron.website/@gasman

Release files for pyrecoil 0.3.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyrecoil 0.3.11
File Size Uploaded
pyrecoil-0.3.11.tar.gz 141.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pyrecoil 0.3.11
File
pyrecoil-0.3.11-cp313-cp313-macosx_10_13_universal2.whl CPython 3.13 CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64) Details
pyrecoil-0.3.11-cp312-cp312-macosx_10_9_universal2.whl CPython 3.12 CPython 3.12 macOS 10.9+ universal2 (ARM64, x86-64) Details
pyrecoil-0.3.11-cp311-cp311-macosx_10_9_universal2.whl CPython 3.11 CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) Details
pyrecoil-0.3.11-cp310-cp310-macosx_10_9_universal2.whl CPython 3.10 CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) Details
pyrecoil-0.3.11-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details
pyrecoil-0.3.11-cp38-cp38-macosx_10_9_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64 Details

Total release size: 3.0 MB

Release files / pyrecoil-0.3.11.tar.gz

Download URL pyrecoil-0.3.11.tar.gz
Size 141.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6047250cf301d06ab9f4fb1123680cdf47bf08ef6808e8d2828d5101eb526d49
BLAKE2b-256 checksum
How to use checksums
0a476cfa824a7b9253748f6cc2d3c2fe238db3be8c1f7cf1d2968218ffb88909
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.0

Release files / pyrecoil-0.3.11-cp313-cp313-macosx_10_13_universal2.whl

Download URL pyrecoil-0.3.11-cp313-cp313-macosx_10_13_universal2.whl
Size 566.1 kB
Tags CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
10c84b1f5480575e403c034b19d9ae8f340ae01d533de1ab275ce96af8900036
BLAKE2b-256 checksum
How to use checksums
3f4006eca6d09dab40b6cea3c7a9b73a477834eb787f2c1f123da8c92f0edc7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.0

Release files / pyrecoil-0.3.11-cp312-cp312-macosx_10_9_universal2.whl

Download URL pyrecoil-0.3.11-cp312-cp312-macosx_10_9_universal2.whl
Size 563.8 kB
Tags CPython 3.12 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
1ed0bc6a8e42f64eaf62ebb0de1da92e7830f2ee999f73202a5dd18eb813787f
BLAKE2b-256 checksum
How to use checksums
4bf61803db453045605a3cec69f3a7e5b4912fed772aabc356a8d82946f31cbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.0

Release files / pyrecoil-0.3.11-cp311-cp311-macosx_10_9_universal2.whl

Download URL pyrecoil-0.3.11-cp311-cp311-macosx_10_9_universal2.whl
Size 563.8 kB
Tags CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
e9346588cd5dc2058276b8ec9b8574c897f7fbc6ad90454f42837c33edd4804b
BLAKE2b-256 checksum
How to use checksums
8848fda82f1eee61e21f6ee0b83ce0375e686119c806e6c40bb62f03ddafb079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.0

Release files / pyrecoil-0.3.11-cp310-cp310-macosx_10_9_universal2.whl

Download URL pyrecoil-0.3.11-cp310-cp310-macosx_10_9_universal2.whl
Size 563.8 kB
Tags CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
7fc24099bf4748b50a9864f3d544c35c6d11443ba55dd77e85bfbdbda1087efd
BLAKE2b-256 checksum
How to use checksums
3b1ea26f531be83217df73f3f8ed4181519be2c9b839634cf7797e7f151e5e6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.0

Release files / pyrecoil-0.3.11-cp39-cp39-macosx_10_9_x86_64.whl

Download URL pyrecoil-0.3.11-cp39-cp39-macosx_10_9_x86_64.whl
Size 292.6 kB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
aeb019a866c9d71a7844894c5206101009f5287f1e6aefbdf825367ef2c58db8
BLAKE2b-256 checksum
How to use checksums
27ba0ce7f736a47e55f26e83072601ec0c07dc3396764cdb162453b80a828705
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.0

Release files / pyrecoil-0.3.11-cp38-cp38-macosx_10_9_x86_64.whl

Download URL pyrecoil-0.3.11-cp38-cp38-macosx_10_9_x86_64.whl
Size 292.5 kB
Tags CPython 3.8 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
1ae3c5de1087fa8e5cc1951470e2166b727bd14345b9cf5ee4004cbeafabb098
BLAKE2b-256 checksum
How to use checksums
091d43d1c9ade4a0ec659d6f3baea278f40ac7eb4ab7f15189459b922cc0c3b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.3.11 This release

7 release files

0.3.9

7 release files

0.3.8

6 release files

0.3.7

6 release files

0.3.6

6 release files

0.3.5

6 release files

0.3.4

5 release files

0.3.3

7 release files

0.3.2

6 release files

0.3.1

5 release files

0.3

5 release files

0.2

2 release files

0.1.1

2 release files

0.1

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