package core:image/qoi

⌘K
Ctrl+K
or
/

    Overview

    package qoi implements a QOI image reader

    The QOI specification is at https://qoiformat.org.

    Index

    Variables (0)

    This section is empty.

    Procedure Groups (2)

    Types

    Error ¶

    Error :: image.Error

    Image ¶

    Image :: image.Image

    Options ¶

    Options :: image.Options

    QOI_Opcode_Tag ¶

    QOI_Opcode_Tag :: enum u8 {
    	// 2-bit tags
    	INDEX = 0,   // 6-bit index into color array follows
    	DIFF  = 64,  // 3x (RGB) 2-bit difference follows (-2..1), bias of 2.
    	LUMA  = 128, // Luma difference
    	RUN   = 192, // Run length encoding, bias -1
    	// 8-bit tags
    	RGB   = 254, // Raw RGB  pixel follows
    	RGBA  = 255, // Raw RGBA pixel follows
    }

    RGBA_Pixel ¶

    RGBA_Pixel :: [4]u8

    RGB_Pixel ¶

    RGB_Pixel :: [3]u8

    Constants

    QOI_Data_Mask ¶

    QOI_Data_Mask :: 0b0011_1111

    QOI_Opcode_Mask ¶

    QOI_Opcode_Mask :: 0b1100_0000

    Variables

    This section is empty.

    Procedures

    destroy ¶

    destroy :: proc(img: ^image.Image) {…}
     

    Cleanup of image-specific data.

    load_from_bytes ¶

    load_from_bytes :: proc(data: []u8, options: image.Options, allocator: runtime.Allocator) -> (img: ^image.Image, err: image.Error) {…}

    load_from_context ¶

    load_from_context :: proc(ctx: ^$T, options: image.Options = Options{}, allocator := context.allocator) -> (img: ^image.Image, err: image.Error) {…}

    load_from_file ¶

    load_from_file :: proc(filename: string, options: image.Options = Options{}, allocator := context.allocator) -> (img: ^image.Image, err: image.Error) {…}

    qoi_hash ¶

    qoi_hash :: proc(pixel: [4]u8) -> (index: u8) {…}

    save_to_buffer ¶

    save_to_buffer :: proc(output: ^bytes.Buffer, img: ^image.Image, options: image.Options = Options{}, allocator := context.allocator) -> (err: image.Error) {…}

    save_to_file ¶

    save_to_file :: proc(output: string, img: ^image.Image, options: image.Options = Options{}, allocator := context.allocator) -> (err: image.Error) {…}

    Procedure Groups

    Source Files

    Generation Information

    Generated with odin version dev-2024-03 (vendor "odin") Windows_amd64 @ 2024-03-27 21:08:30.721048600 +0000 UTC