package core:image/jpeg

⌘K
Ctrl+K
or
/

    Overview

    Reader for baseline JPEG images.

    Types

    Block ¶

    Block :: [Component][64]i16
     

    8x8 block of pixels

    Coefficient ¶

    Coefficient :: enum u8 {
    	DC, 
    	AC, 
    }

    Color_Component ¶

    Color_Component :: struct {
    	dc_table_idx:           u8,
    	ac_table_idx:           u8,
    	quantization_table_idx: u8,
    	v_sampling_factor:      int,
    	h_sampling_factor:      int,
    }

    Component ¶

    Component :: enum u8 {
    	Y  = 1, 
    	Cb = 2, 
    	Cr = 3, 
    }

    Error ¶

    Error :: image.Error

    Related Procedures With Returns

    Huffman_Table ¶

    Huffman_Table :: struct {
    	symbols: [176]u8,
    	codes:   [176]u32,
    	offsets: [17]u8,
    }

    Image ¶

    Image :: image.Image

    Related Procedures With Returns

    Options ¶

    Options :: image.Options

    Related Procedures With Parameters

    Constants

    COEFFICIENT_COUNT ¶

    COEFFICIENT_COUNT :: BLOCK_SIZE * BLOCK_SIZE

    SEGMENT_MAX_SIZE ¶

    SEGMENT_MAX_SIZE :: 65533

    THUMBNAIL_PALETTE_SIZE ¶

    THUMBNAIL_PALETTE_SIZE :: 768
     

    768 bytes of 24-bit RGB values.

    Variables

    This section is empty.

    Procedures

    destroy ¶

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

    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:       ^$C, 
    	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) {…}

    Procedure Groups

    Source Files

    Generation Information

    Generated with odin version dev-2026-10 (vendor "odin") Windows_amd64 @ 2026-10-10 00:25:51.511820200 +0000 UTC