Quite OK Image Format
Script error: No such module "Draft topics".
Script error: No such module "AfC topic".
Logo of the Quite OK Image format | |
Filename extension | .qoi |
---|---|
Magic number | 71 6f 69 66 |
Developed by | Dominic Szablewski |
Initial release | 5 January 2022 |
Latest release | 1.0 (5 January 2022 ) |
Type of format | Lossless bitmap image format |
Open format? | Yes |
Website | https://qoiformat.org/ |
The Quite OK Image is a lossless raster image file format. The developer, Dominic Szablewski, wanted an image file format that is simpler and easier to implement than other alternatives, while having a free standard and a faster encoding time. The developer claimed that the format offers 20 to 50 times faster encoding time and 2 to 4 times faster decoding time than the widely used PNG format, while retaining a similar compression ratio to PNG.[1][2]
History[edit]
The developer, Dominic Szablewski, argues that the current mainstream file formats are either patented or very complex. Therefore, QOI is developed to provide a simple and speedy image formats with a slight compression ratio tradeoff.[2][3]
File Format[edit]
File Header[edit]
A QOI file starts with a 14-byte header.[4]
Values (hex) | Purpose |
---|---|
71 6f 69 66
|
In ASCII, the letters QOIF. |
8 bytes | 4 bytes for width in pixels and 4 bytes for height in pixels. |
1 byte | Indicate whether RGB or RGBA channel is used. Does not affect encoding. |
1 byte | Indicate the colorspace used, either sRGB with linear channel or all linear channel. Does not affect encoding. |
Image Encoding[edit]
QOI encodes images row by row, left to right, top to bottom. The encoder keep track of an array of 64 pixels previously seen and uses four methods to encode pixels:[4]
- Run-length encoding of the previous pixel (QOI_OP_RUN)
- Index into the array of previously seen pixel (QOI_OP_INDEX)
- Difference compared to the previous pixel (QOI_OP_DIFF or QOI_OP_LUMA)
- Full RGB or RGBA value (QOI_OP_RGB or QOI_OP_RGBA)
Performance[edit]
In a benchmark[lower-alpha 1] done by its developer, the encoding speed of QOI is about 29 times faster than PNG while the image compressed size is about 16% larger.[1]
The encoder/decoder is also very lightweight at only ~300 lines of C code.
Software Support[edit]
Community made plugins are available in GIMP, Paint.NET and XnView MP.[3]
There are also implementations for various languages such as Rust, Python, Java, C# and more.[5]
Notes[edit]
- ↑ Done single threaded on an Intel i7-6700K using libpng
References[edit]
- ↑ 1.0 1.1 "The official QOI format website". Retrieved March 31, 2022.
- ↑ 2.0 2.1 "Lossless Image Compression in O(n) Time". Retrieved March 31, 2022.
- ↑ 3.0 3.1 James Hein. "Moving images to the next level". Bangkok Post. Retrieved April 1, 2022.
- ↑ 4.0 4.1 QOI Specification
- ↑ Simon Sharwood. "Developer creates 'Quite OK Image Format' – but it performs better than just OK". The Register.
External links[edit]
This computing article is a stub. You can help EverybodyWiki by expanding it. |
This article "Quite OK Image Format" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Quite OK Image Format. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.