A simple implementation of the QOI image format in Pyhton.
Project description
Python QOI
QOI (Quite OK Image format) is a new lossless image format that achieves compression rates close to PNG with a 20x-50x faster encoding.
This here is a naive Python way of implementing the QOI compression format and of course much slower than the C implementation.
There's a python wrapper around the original C implementation, which retains the C performance.
The CLI interface was liberally borrowed from Python QOI (py-qoi). The encoder/decoder is an reimplementation.
Requirements
The only requirement besides Python 3.10+ is Pillow to load and save images in formats other than QOI, and numpy for matrix manipulations.
Usage
To encode an image:
python3 qoi-quedvi/qoi.py -e -f image_file.png
The input image may be of any pillow-supported format. A file with name image_file.qoi will be saved on the same folder as the original image.
To decode a QOI image:
python3 qoi-conv/qoi.py -d -f image_file.qoi
A file with name image_file.png will be saved on the same folder as the original image.
usage: qoi-quedvi/qoi.py [-h] [-e] [-d] [-f FILE_PATH]
optional arguments:
-h, --help show this help message and exit
-e, --encode
-d, --decode
-v, --verbose get additional info
-f FILE_PATH, --file-path FILE_PATH
path to image file to be encoded or decoded
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file qoi-conv-1.0.2.tar.gz.
File metadata
- Download URL: qoi-conv-1.0.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15cf7bfe364e94724e4a4c3c903fa2d6910c600a8d0004b4f0764a76b44c29c1
|
|
| MD5 |
dfcd7271aac9ad98010e52a596fff1c4
|
|
| BLAKE2b-256 |
b7e9b2d73c4018f114869a03d3bf00b42fb777e18627adab037eb6ac53a7a459
|