package core:image/bmp

⌘K
Ctrl+K
or
/

    Overview

    Reader and writer for Microsoft BMP images.

    Types

    Bitmask ¶

    Bitmask :: struct {
    	mask:  [4]u32le `fmt:"b"`,
    	shift: [4]u32le,
    	bits:  [4]u32le,
    }

    Image ¶

    Image :: image.Image

    Related Procedures With Parameters

    Related Procedures With Returns

    Options ¶

    Options :: image.Options

    Related Procedures With Parameters

    RGB_Pixel ¶

    RGB_Pixel :: [3]u8

    Constants

    INFO_STUB_SIZE ¶

    INFO_STUB_SIZE :: FILE_HEADER_SIZE + size_of(image.BMP_Version)

    Variables

    This section is empty.

    Procedures

    align2 ¶

    align2 :: proc(width: int) -> (stride: int) {…}

    align4 ¶

    align4 :: proc(width: int) -> (stride: int) {…}

    decode_rgb ¶

    decode_rgb :: proc(
    	ctx:       ^$C, 
    	img:       ^image.Image, 
    	info:      image.BMP_Header, 
    	allocator := context.allocator, 
    ) -> (err: image.Error) {…}

    decode_rle ¶

    decode_rle :: proc(
    	ctx:       ^$C, 
    	img:       ^image.Image, 
    	info:      image.BMP_Header, 
    	allocator := context.allocator, 
    ) -> (err: image.Error) {…}

    destroy ¶

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

    Cleanup of image-specific data.

    is_os2 ¶

    is_os2 :: proc(version: image.BMP_Version) -> (res: bool) {…}

    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 ¶

    @(optimization_mode="favor_size")
    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) {…}

    make_output ¶

    make_output :: proc(img: ^image.Image, allocator := context.allocator) -> (err: image.Error) {…}

    read_or_make_bit_masks ¶

    read_or_make_bit_masks :: proc(
    	ctx:  ^$C, 
    	info: image.BMP_Header, 
    ) -> (res: Bitmask, read: int, 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) {…}

    scale ¶

    scale :: proc(val: $T, mask, shift, bits: u32le) -> (res: u8) {…}

    skip_space ¶

    skip_space :: proc(ctx: ^$C, bytes_to_skip: int) -> (err: image.Error) {…}

    write ¶

    write :: proc(img: ^image.Image, x, y: int, pix: [3]u8) -> (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