You can edit almost every page by Creating an account. Otherwise, see the FAQ.

Quite OK Image Format

From EverybodyWiki Bios & Wiki



Script error: No such module "Draft topics". Script error: No such module "AfC topic".


Quite OK Image
Logo of the Quite OK Image Format
Logo of the Quite OK Image format
Filename extension.qoi
Magic number71 6f 69 66
Developed byDominic Szablewski
Initial release5 January 2022
Latest release
1.0
(5 January 2022; 2 years ago (2022-01-05))
Type of formatLossless bitmap image format
Open format?Yes
Websitehttps://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]

  1. Done single threaded on an Intel i7-6700K using libpng

References[edit]

  1. 1.0 1.1 "The official QOI format website". Retrieved March 31, 2022.
  2. 2.0 2.1 "Lossless Image Compression in O(n) Time". Retrieved March 31, 2022.
  3. 3.0 3.1 James Hein. "Moving images to the next level". Bangkok Post. Retrieved April 1, 2022.
  4. 4.0 4.1 QOI Specification
  5. Simon Sharwood. "Developer creates 'Quite OK Image Format' – but it performs better than just OK". The Register.

External links[edit]



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.