RECOIL库的Python绑定,Retro Computer Image Library
项目描述
pyrecoil 为 RECOIL(Retro Computer Image Library)提供Python绑定,允许您打开来自复古计算机的500多种图像文件格式。
安装
pip install pyrecoil
pyrecoil 与 Pillow(Python Image Library的活跃分支)一起安装时最为有用。
pip install Pillow
使用方法
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')
构建说明
RECOIL库本身是用 Fusion编程语言 实现的。为了便于分发,包含在包中的C输出(recoil.c 和 recoil.h)来自 fut 编译器,以及 recoil_interface.c,共同构成了Python扩展模块。
项目详情
关闭
pyrecoil-0.3.10.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a5ceed2bb9490e2ffacf5907bf00eaf26cde337d47f79133fc9efbbf7119cb5b |
|
MD5 | 01075d06a962a6a522678c53ba955501 |
|
BLAKE2b-256 | 50cd6ebd6df1baa59c9f97910a5f8f5b40c130b191fc246077cd73b940d9896f |
关闭
pyrecoil-0.3.10-cp312-cp312-macosx_10_9_universal2.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | ad69b67653604d425a85f836291f0c48a3fc694a29227bd038b5abc0dbbec384 |
|
MD5 | b6011ff428ff2b6f6f61c6e934b0e13a |
|
BLAKE2b-256 | 0fd1467698d532494fa5edfce950022986b63485aee83cee86a87f0c826a6f73 |
关闭
pyrecoil-0.3.10-cp311-cp311-macosx_10_9_universal2.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | de5061f79976010ff48c17e31252271138eb1cba71beb81b61933ba1219ce745 |
|
MD5 | e2c271fa937392db64cfed98aea4b194 |
|
BLAKE2b-256 | 5614c94a019f96ff60af65b1097a86ee0b5b14d379e31f4dde61a55457fe81a3 |
关闭
pyrecoil-0.3.10-cp310-cp310-macosx_10_9_universal2.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | ac3af64c413d7b736ef75a0c03318c94e40b57f9a0ccb62aa5d13ff89eb9a386 |
|
MD5 | eb7207953189f6da59276b239cf21c1b |
|
BLAKE2b-256 | 735623f1ae61dbe09fb7e501acb0e00462a62180d1b504ba1c10ab2f526ae835 |
关闭
哈希值 用于 pyrecoil-0.3.10-cp39-cp39-macosx_10_9_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | c5c599145e11135ec83406eaa46e5da2434d26c058379c738c45fd295d156994 |
|
MD5 | 055aa03f00ab16ffd28863c11a89accf |
|
BLAKE2b-256 | 378060049fc9a5f15c46390e3393994b58fe3785303504a07bf03359db813527 |
关闭
哈希值 用于 pyrecoil-0.3.10-cp38-cp38-macosx_10_9_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 313df1ddbde9ec46001b151b79b55ff995eb87e831e291ea89de8d93b959be27 |
|
MD5 | 7d26c77d597c7adb9cf68f5a503d2ca6 |
|
BLAKE2b-256 | 069b7142e4dd411f0cc318e498efbd360336557217a778007114ecbbb6d42279 |
关闭
哈希值 用于 pyrecoil-0.3.10-cp37-cp37m-macosx_10_9_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | b3ed6d85de91a28a9459ef85cd1d427126b5bf4afa212087e8b955295477c44e |
|
MD5 | 302b262c528263bebda9949aacdbf412 |
|
BLAKE2b-256 | 53067e06bd5002162f3152d58c9857dee0c0523475a4b92e8cd36a5898dd4051 |