Images

QOI – The Quite OK Image Format

There are 2 main types of compression. Lossy compression is a data encoding method which reduces a file by discarding certain information. When the file is uncompressed, not all of the original information will be recovered. Lossy compression is typically used to compress video, audio and images, as well as internet telephony. The fact that information is lost during compression will often be unnoticeable to most users. Lossy compression techniques are used in all DVDs, Blu-ray discs, and most multimedia available on the internet.

However, lossy compression is not appropriate where the original and the decompression data must be identical. In this situation, the user will need to use lossless compression. This type of compression is employed in compressing software applications, files, and text articles. But you may also want to use lossless compression for images.

QOI is an image encoder which claims to be fast 20-50 times compressing and 3-4 times faster decompressing compared to the Libpng library.

A QOI file consists of a 14-byte header, followed by any number of data “chunks” and an 8-byte end marker. Images are encoded row by row, left to right, top to bottom.

Installation

In this section we install both QOI and a couple of image viewers that supports .qoi image files.

We tested QOI with the latest release of Ubuntu. That’s version 23.10, codenamed Mantic Minotaur. There’s a deb package available which is installed with the command:

$ sudo apt install qoi

QOI installation

The image below shows the installed files.

Installed files from qoi package

Optional Software
qoiview

We installed qoiview, a simple .qui image file viewer:

On Ubuntu, we needed to install some development packages first.

$ sudo apt install libx11-dev libxi-dev libxcursor-dev libgl1-mesa-dev

You may already have some or all of these packages installed on your system.

Clone qoiview’s GitHub repository:

$ git clone https://github.com/floooh/qoiview

Change into the newly created directory.

$ cd qoiview

Build the software:

$ cmake ..
$ cmake --build .

Now we have a basic image viewer to view .qoi image files.

tev

For a more feature-laden image viewer, we also installed tev. The project provides an AppImage (a format for distributing portable software on Linux). We also needed to install the libfuse2 package.

$ sudo apt install libfuse2

Download the tev application (.appimage) from tev’s GitHub and make the .appimage executable.

$ chmod u+x tev.appimage

Next page: Page 2 – In Operation and Summary

Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation and Summary

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Please read our FAQ before making a comment.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments