module Eagle::Codecs::QOI

Overview

QOI ("Quite OK Image") decoding and encoding. Lossless like PNG, but much faster to encode and decode, which makes it good for screenshots and caches.

Defined in:

eagle/assets/codecs/qoi.cr

Constant Summary

MAGIC = Bytes[113, 111, 105, 102]

The four bytes every QOI file starts with.

Class Method Summary

Class Method Detail

def self.decode(data : Bytes) : Image #

Decodes QOI bytes into an image.


def self.encode(img : Image) : Bytes #

Encodes an image as QOI.


def self.qoi?(data : Bytes) : Bool #

True when data starts with the QOI magic.