Skip to content
FutureBlitz

    Install

    Import std.image.bitmap

    Qoi

    std.image.bitmap

    struct

    Public Struct Qoi

    What reads and writes QOI images, in its Static Methods.

    Examples

    Local image = Image(3, 2)
    image[1, 1] = Color32.Red
    Local qoi = Qoi.Encode(image)
    Local back = Try Qoi.Decode(qoi)
    Expect(back.Width == 3 && back[1, 1] == Color32.Red)

    std/image/bitmap.fb, line 100

    • @PanicsAtCaller Public Static Method Decode(data: UInt8[], limit: Int = MOST_PIXELS): Image Throws IOError static method #

      The image in data, a QOI of 3 or 4 channels. Throws an IOError of INVALID_DATA when the data isn't a QOI or is broken, UNEXPECTED_END when it ends before its pixels do, and OTHER when the image has more pixels than limit. Panics when the limit is negative.

    • @PanicsAtCaller Public Static Method Encode(image: Image): UInt8[] static method #

      The QOI of the image, 4 channels, in sRGB. Panics when it has no pixels.

    Report an issue with this page or with FutureBlitz on GitHub.