package core:image/bmp

⌘K
Ctrl+K
or
/

    Overview

    package bmp implements a Microsoft BMP image reader

    Types

    Bitmask ¶

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

    Error ¶

    Error :: image.Error

    Image ¶

    Image :: image.Image

    Options ¶

    Options :: image.Options

    RGBA_Pixel ¶

    RGBA_Pixel :: [4]u8

    RGB_Pixel ¶

    RGB_Pixel :: [3]u8

    Constants

    FILE_HEADER_SIZE ¶

    FILE_HEADER_SIZE :: 14

    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: ^$T, img: ^image.Image, info: image.BMP_Header, allocator := context.allocator) -> (err: image.Error) {…}

    decode_rle ¶

    decode_rle :: proc(ctx: ^$T, 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 ¶

    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) {…}

    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: ^$T, 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: ^$T, 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-2024-09 (vendor "odin") Windows_amd64 @ 2024-09-07 21:12:27.324798700 +0000 UTC