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
Types (6)
Constants (2)
Variables (0)
This section is empty.
Types
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
load_from_bytes ¶
load_from_bytes :: proc(data: []u8, options: image.Options = Options{}, allocator := context.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) {…}
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
load ¶
load :: proc{ load_from_file, load_from_bytes, load_from_context, }
save ¶
save :: proc{ save_to_buffer, save_to_file, }
Source Files
Generation Information
Generated with odin version dev-2024-11 (vendor "odin") Windows_amd64 @ 2024-11-20 21:11:50.595270000 +0000 UTC