Skip to main content

qoi-rs

Python library made using qoi and pyo3.

Usage

The decode function operates on normal python types implementing the Buffer protocol (bytes, memoryview, bytesarray). The encode function returns a custom image object with all information extracted from the qoi image. The raw pixel data is available as a bytes object at the data property.

from qoi_rs import decode, encode

with open("./qoi_test_images/dice.qoi", "rb") as file:
    image = decode(file.read())

qoi_bytes = encode(
    image.data,
    # required
    height=image.height, width=image.width,
    # defaults to "RGB" or "RGBA" depending on bytes in data
    input_channels=image.mode,
    # optional colour space
    colour_space=image.colour_space,
)

assert decode(qoi_bytes).data == image.data

With Pillow

For use with Pillow are two convenience functions available. While encode_pillow doesn't depend on Pillow and could work with other types, decode_pillow tries to import Pillow and fails if it isn't installed. Use pip install qoi_rs[pillow] to make sure a supported Pillow version is installed if you use one of these functions with Pillow.

from PIL import Image
from qoi_rs import decode_pillow, encode_pillow

image: Image.Image = Image.open("./qoi_test_images/dice.png")

qoi_bytes: bytes = encode_pillow(image)
decoded: Image.Image = decode_pillow(qoi_bytes)

assert decoded.width == image.width
assert decoded.height == image.height

assert decoded.get_flattened_data() == image.get_flattened_data()

image.close()
decoded.close()

Download files

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

Source Distribution

qoi_rs-4.1.0.tar.gz (3.4 MB view details)

Uploaded Source

Built Distributions

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

qoi_rs-4.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (746.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

qoi_rs-4.1.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (707.0 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

qoi_rs-4.1.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl (830.0 kB view details)

Uploaded CPython 3.15CPython 3.15+musllinux: musl 1.2+ x86-64

qoi_rs-4.1.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl (769.7 kB view details)

Uploaded CPython 3.15CPython 3.15+musllinux: musl 1.2+ ARM64

qoi_rs-4.1.0-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (746.4 kB view details)

Uploaded CPython 3.15CPython 3.15+manylinux: glibc 2.17+ x86-64

qoi_rs-4.1.0-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (704.9 kB view details)

Uploaded CPython 3.15CPython 3.15+manylinux: glibc 2.17+ ARM64

qoi_rs-4.1.0-cp314-cp314-musllinux_1_2_x86_64.whl (827.6 kB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

qoi_rs-4.1.0-cp314-cp314-musllinux_1_2_aarch64.whl (769.0 kB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ ARM64

qoi_rs-4.1.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (745.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

qoi_rs-4.1.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (704.4 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ ARM64

qoi_rs-4.1.0-cp314-abi3-musllinux_1_2_x86_64.whl (828.7 kB view details)

Uploaded CPython 3.14+musllinux: musl 1.2+ x86-64

qoi_rs-4.1.0-cp314-abi3-musllinux_1_2_aarch64.whl (768.3 kB view details)

Uploaded CPython 3.14+musllinux: musl 1.2+ ARM64

qoi_rs-4.1.0-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (744.5 kB view details)

Uploaded CPython 3.14+manylinux: glibc 2.17+ x86-64

qoi_rs-4.1.0-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (703.8 kB view details)

Uploaded CPython 3.14+manylinux: glibc 2.17+ ARM64

qoi_rs-4.1.0-cp312-abi3-musllinux_1_2_x86_64.whl (828.8 kB view details)

Uploaded CPython 3.12+musllinux: musl 1.2+ x86-64

qoi_rs-4.1.0-cp312-abi3-musllinux_1_2_aarch64.whl (767.8 kB view details)

Uploaded CPython 3.12+musllinux: musl 1.2+ ARM64

qoi_rs-4.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (744.4 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ x86-64

qoi_rs-4.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (703.9 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARM64

File details

Details for the file qoi_rs-4.1.0.tar.gz.

File metadata

  • Download URL: qoi_rs-4.1.0.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for qoi_rs-4.1.0.tar.gz
Algorithm Hash digest
SHA256 2ab21eaec15cd5dd868e671dd3f91cbf9d4115bc6b7f7804fb9f192f8c9238bc
MD5 1a625a0f2a13d0249714bb9ec76562ce
BLAKE2b-256 98895cdd85f6dc10fbdf490ee516b21b7f33702a5f99680c63ff2bb38cf75a2e

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ec3ecc01687c90a9fd9d75049e0d262a862688d9c9213ff8598f4b72dbe9d307
MD5 37ec0680f6824f0cb5f52abda116d482
BLAKE2b-256 5342338c188c860e8c584424806563eb40de982a9c6aa1dd387c33ea3455948c

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 13947309bdebde345d2f35e62c8ed6f65f8f844be0a9187f68772d08d235b30d
MD5 b58079ce8c6280e17d858b2c30096a4b
BLAKE2b-256 aecac75a50fe7fd0239f76a037ceb76383a388af4ee950332918d545dbc3f684

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 beb7d3bcb09d261192581d396eee999bd09639e9ef4ccfeaffbf8985b2961990
MD5 107e9d46bbb77415f9512eeded8fbc1a
BLAKE2b-256 662d7434b4684db2c12c57daaa9bb76dad440ea0a396eaa799e033c17fbf1f28

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 28f2c94640787221b2c9ef823fae1ac1eeef49cb05b46a32e37153f4679a24db
MD5 1f2b88c9f7c80f089d86bc0366bd0a74
BLAKE2b-256 a828bce8e2fc4990c8bf30b59306154e834c219532495131097113f70ea31ca4

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 538870d0e2197579b53736133d91ba78c0a503fa059cb0861af630bb0a9d38d9
MD5 dddea9187434b15277de8a96f72c1a90
BLAKE2b-256 e08e477a01060c842d7eff374484e7c278906a1e4095a165b037239d72c72ff0

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 85977d96ed8c71ad952dc517bfc0f3f8450eb7ea2327ad9a48d9dd78eeef6a85
MD5 a7135f516e4328de79581325246ffa94
BLAKE2b-256 747f7245900045177d73e6c67873aca61ba0fcc94515562a970408dee209990e

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0160ae616e8edd3e5057dc9543326cceb65ba76f538336cae4bddcdff0805cbd
MD5 73fa168dbe73346738a335831d12714f
BLAKE2b-256 336833e440209b8a4867cdc9be746ab187004861753e68405eaf0c3311aec1bd

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp314-cp314-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp314-cp314-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 ae4bb420306f81c29474fe9935b67cf0d336b8460e0d3a349dc93d50be7697ce
MD5 d9b81448afd504f64975a8001978e829
BLAKE2b-256 3e16a9aac101d0b06b677d3669e1d631c75f1a0b5b9923d84d53b54ca7b43b70

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b41bba28c766ae03b5053d0bf11d99d53ce520849b9de1c88866016aa4d933ac
MD5 9c183b64c8e63c8e34d4ece59c390441
BLAKE2b-256 670d9446b0e542081ac832cffe12b01bb5f870332f523065f812b6fb6442f58d

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 fe4a00c0acaff62c85ddab35e0343bfcb75176daa506459be89736ceb97a57cc
MD5 86d517487eddad1103bbf5e85a113ce1
BLAKE2b-256 27faa10dbf94e8836428b38b8f0aae0a22047f007a1513f1c8c2b8a87a6497f5

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp314-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp314-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5109f54993e924dc69bb0ebf87f50db4ba25464e156a704daa4d8a474dd07439
MD5 c48e14fb6f17b30c7102ce45cd0d8171
BLAKE2b-256 9c7fca445abd479e3fa93ad0a9e6f28a3baefb7d205daf1ce547e84834380be7

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp314-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp314-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 58ddbeb1a400efcb95dc16a7d83a3a9ba1980587770a3568410719fe5de0da70
MD5 f4c02791a80b1be5a5692556357eb1a2
BLAKE2b-256 0fc95cba5214fbe6c203c0307838abeb14accf67645a1529360cac9afdfe5663

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 763fbf8cd42dbed17fb5c5817e468eb68db8a7bd0a1451ebc728da8f6ada9207
MD5 0a70c503884877560b8b96499a7e8d04
BLAKE2b-256 a5d04330c0cb4e2c4ceede1b50f74973e0f89a36a5768ab0d5898fa7864ff1a1

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c936ede04b9b55a9754690f6c825f24218efb017fa448f0a12fc38e3ecf9bcd3
MD5 4720b110e3101120ef52d3f37ab3a2dc
BLAKE2b-256 983508cd3c2733fbf4732a825bdc9ea910fae810ae6af3635b249444d8a32075

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 811bc390e22ec2a6beab21edf2dca19645b10e4fc4d1c089a1b6568f4204e113
MD5 07d192f932c05bc94c8daa6af1d5e71e
BLAKE2b-256 97eb8d4f2a0a686b50c945699f173cac4688f914b6e2cb9f43a4f200fea093e0

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp312-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp312-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 5c2f659e7303ce81f0f2001339ca09e44b025800c86a3562d07f3a977c6d912f
MD5 f688a283892f9bc2663b751cdf5ca70b
BLAKE2b-256 3504d27f5d5e271eeb836e027709e715ca54e701f320a62adc07d6c6bb8318fb

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b1d9c34b34f5bc6e52dcc787559578c396974c7dff5502b704371b45eef6d04d
MD5 43eea58fa99aea3bc5e36fbd4f257270
BLAKE2b-256 0baea89ea95cfbb276dd2aac4887e9643597c27f2cc306f4e9e4dccb229b1848

See more details on using hashes here.

File details

Details for the file qoi_rs-4.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for qoi_rs-4.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 96079abbf6f09bde06ac6896aa513fd878850f361f3efa70b99d3ceaa5da7553
MD5 ac49ec7ff52ef71ee13adc0d67a65095
BLAKE2b-256 e2d663d9f5464ff87cd0379e28b8b77657690c0ce8cd486da12e8ef2216b4eab

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

4.1.0 This release

19 files

4.0.10

15 files

4.0.9

15 files

4.0.8

15 files

4.0.7

15 files

4.0.6

5 files

4.0.5

5 files

4.0.4

3 files

4.0.3

3 files

4.0.2

3 files

4.0.1

3 files

4.0.0

3 files

3.1.0

3 files

3.0.0

2 files

2.2.1

2 files

2.2.0

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

1.0.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