Skip to content
/ qoi Public

naive implementation of QOI the quite ok image format

License

Notifications You must be signed in to change notification settings

quedvi/qoi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

naive implementation of QOI the quite ok image format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages