package core:image/netpbm

Types

Error ¶

Error :: image.Error

Format_Error ¶

Format_Error :: image.Netpbm_Error

Formats ¶

Formats :: bit_set[image.Netpbm_Format]

Image ¶

Image :: image.Image

Info ¶

Info :: image.Netpbm_Info

Constants

ASCII ¶

ASCII: bit_set[image.Netpbm_Format] : Formats{.P1, .P2, .P3}

BINARY ¶

BINARY: bit_set[image.Netpbm_Format] : Formats{.P4, .P5, .P6} + PAM + PFM

PAM ¶

PAM: bit_set[image.Netpbm_Format] : Formats{.P7}

PBM ¶

PBM: bit_set[image.Netpbm_Format] : Formats{.P1, .P4}

PFM ¶

PFM: bit_set[image.Netpbm_Format] : Formats{.Pf, .PF}

PGM ¶

PGM: bit_set[image.Netpbm_Format] : Formats{.P2, .P5}

PNM ¶

PNM: bit_set[image.Netpbm_Format] : PBM + PGM + PPM

PPM ¶

PPM: bit_set[image.Netpbm_Format] : Formats{.P3, .P6}

Variables

This section is empty.

Procedures

autoselect_pbm_format_from_image ¶

autoselect_pbm_format_from_image :: proc "odin" (img: ^image.Image, prefer_binary: bool = true, force_black_and_white: bool = false, pfm_scale: f32 = f32(1.0)) -> (res: image.Netpbm_Info, ok: bool) {…}
 

Automatically try to select an appropriate format to save to based on img.channel and img.depth

decode_image ¶

decode_image :: proc "odin" (img: ^image.Image, header: image.Netpbm_Header, data: []u8, allocator := context.allocator) -> (err: image.Error) {…}

destroy ¶

destroy :: proc "odin" (img: ^image.Image) -> (ok: bool) {…}

header_destroy ¶

header_destroy :: proc "odin" (using header: ^image.Netpbm_Header) {…}

load_from_bytes ¶

load_from_bytes :: proc "odin" (data: []u8, allocator := context.allocator) -> (img: ^image.Image, err: image.Error) {…}

load_from_file ¶

load_from_file :: proc "odin" (filename: string, allocator := context.allocator) -> (img: ^image.Image, err: image.Error) {…}

parse_header ¶

parse_header :: proc "odin" (data: []u8, allocator := context.allocator) -> (header: image.Netpbm_Header, length: int, err: image.Error) {…}

save_to_buffer ¶

save_to_buffer :: proc "odin" (img: ^image.Image, custom_info: image.Netpbm_Info = {}, allocator := context.allocator) -> (buffer: []u8, err: image.Error) {…}

save_to_file ¶

save_to_file :: proc "odin" (filename: string, img: ^image.Image, custom_info: image.Netpbm_Info = {}, allocator := context.allocator) -> (err: image.Error) {…}

Procedure Groups

Source Files

Generation Information

Generated with odin version dev-2022-10 (vendor "odin") Windows_amd64 @ 2022-10-05 21:11:47.461170900 +0000 UTC