core/image/netpbm
netpbm
Types
7Constants
8ASCII
ASCII :: Formats = Formats{.P1, .P2, .P3}SourceBINARY
BINARY :: Formats = Formats{.P4, .P5, .P6} + PAM + PFMSourcePAM
PAM :: Formats = Formats{.P7}SourcePBM
PBM :: Formats = Formats{.P1, .P4}SourcePFM
PFM :: Formats = Formats{.Pf, .PF}SourcePGM
PGM :: Formats = Formats{.P2, .P5}SourcePNM
PNM :: Formats = PBM + PGM + PPMSourcePPM
PPM :: Formats = Formats{.P3, .P6}SourceProcedures
9autoselect_pbm_format_from_image
autoselect_pbm_format_from_image :: proc(img: ^Image, prefer_binary: untyped boolean = true, force_black_and_white: untyped boolean = false, pfm_scale: f32 = f32(1.0)) -> (res: Info, ok: bool)SourceAutomatically try to select an appropriate format to save to based on img.channel and img.depth
decode_image
decode_image :: proc(img: ^Image, header: Header, data: []u8, allocator: mem.Allocator = context.allocator) -> (err: Error)Sourcedestroy
destroy :: proc(img: ^image.Image) -> (bool)Sourceheader_destroy
header_destroy :: proc(header: ^Header)Sourceload_from_bytes
load_from_bytes :: proc(data: []u8, allocator: mem.Allocator = context.allocator) -> (img: ^Image, err: Error)Sourceload_from_file
load_from_file :: proc(filename: string, allocator: mem.Allocator = context.allocator) -> (img: ^Image, err: Error)Sourceparse_header
parse_header :: proc(data: []u8, allocator: mem.Allocator = context.allocator) -> (header: Header, length: int, err: Error)Sourcesave_to_buffer
save_to_buffer :: proc(img: ^Image, custom_info: Info, allocator: mem.Allocator = context.allocator) -> (buffer: []u8, err: Error)Sourcesave_to_file
save_to_file :: proc(filename: string, img: ^Image, custom_info: Info, allocator: mem.Allocator = context.allocator) -> (err: Error)SourceProcedure Groups
2load
load :: proc{load_from_file, load_from_bytes}Sourcesave
save :: proc{save_to_file, save_to_buffer}Source