core/image/bmp
core_image_bmp
Types
6Constants
2FILE_HEADER_SIZE
FILE_HEADER_SIZE :: 14SourceINFO_STUB_SIZE
INFO_STUB_SIZE :: FILE_HEADER_SIZE + size_of(image.BMP_Version)SourceProcedures
16align2
align2 :: proc(width: int) -> (stride: int)Sourcealign4
align4 :: proc(width: int) -> (stride: int)Sourcedecode_rgb
decode_rgb :: proc(ctx: ^C, img: ^Image, info: image.BMP_Header, allocator: mem.Allocator = context.allocator) -> (err: Error)Sourcedecode_rle
decode_rle :: proc(ctx: ^C, img: ^Image, info: image.BMP_Header, allocator: mem.Allocator = context.allocator) -> (err: Error)Sourcedestroy
destroy :: proc(img: ^Image)SourceCleanup of image-specific data.
is_os2
is_os2 :: proc(version: image.BMP_Version) -> (res: bool)Sourceload_from_bytes
load_from_bytes :: proc(data: []u8, options: Options = Options{}, allocator: mem.Allocator = context.allocator) -> (img: ^Image, err: Error)Sourceload_from_context
load_from_context :: proc(ctx: ^C, options: Options = Options{}, allocator: mem.Allocator = context.allocator) -> (img: ^Image, err: Error)Sourceload_from_file
load_from_file :: proc(filename: string, options: Options = Options{}, allocator: mem.Allocator = context.allocator) -> (img: ^Image, err: Error)Sourcemake_output
make_output :: proc(img: ^Image, allocator: mem.Allocator = context.allocator) -> (err: Error)Sourceread_or_make_bit_masks
read_or_make_bit_masks :: proc(ctx: ^C, info: image.BMP_Header) -> (res: Bitmask, read: int, err: Error)Sourcesave_to_buffer
save_to_buffer :: proc(output: ^bytes.Buffer, img: ^Image, options: Options = Options{}, allocator: mem.Allocator = context.allocator) -> (err: Error)Sourcesave_to_file
save_to_file :: proc(output: string, img: ^Image, options: Options = Options{}, allocator: mem.Allocator = context.allocator) -> (err: Error)Sourcescale
scale :: proc(val: T, mask: u32le, shift: u32le, bits: u32le) -> (res: u8)Sourceskip_space
skip_space :: proc(ctx: ^C, bytes_to_skip: int) -> (err: Error)Sourcewrite
write :: proc(img: ^Image, x: int, y: int, pix: RGB_Pixel) -> (err: Error)SourceProcedure Groups
2load
load :: proc{load_from_file, load_from_bytes, load_from_context}Sourcesave
save :: proc{save_to_buffer, save_to_file}Source