code wiki / (root) / nx_media_convert.nx

nx_media_convert.nx

buildroot/runtime/nx_media_convert.nx

5930 B141 linesdepth 9pulls 34 transitivereach 2 importersview sourcekind tooltopic media
docsdependenciesstructsconstsfunctions

about

nx_media_convert.nx -- the user-facing media CONVERT: a real image FILE in, decode -> selectable-model resample -> encode -> real image FILE out, one call. Composes the existing sovereign decoder + the selectable resampler + the sovereign PNG encoder -- ZERO 3rd-party. This is the literal "upscaling / downscaling when media is converted, with easily selectable models" ask. RUNG: RGB PNG in/out (nx_png_write_rgb is RGB). JPEG input (nx_jpeg_decode) + RGBA/gray channel adaptation = flagged next rung. license_tier: ORIGINAL

dependencies 6 imports · 2 importers

nx_syscalls.nx nx_img_resample.nx nx_png_decoder.nx nx_png_write.nx nx_seg_store.nx nx_jpeg_ascii.nx nx_media_convert.nx nx_img_adapt_gate.nx nx_media_convert_jpeg_gate.nx

imports: nx_syscalls.nxnx_img_resample.nxnx_png_decoder.nxnx_png_write.nxnx_seg_store.nxnx_jpeg_ascii.nx

imported by: nx_img_adapt_gate.nxnx_media_convert_jpeg_gate.nx

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap nx_png_write_rgb sys_openat_wr sys_mmap ↻ sys_write pw_chunk pw_u32be sys_mmap ↻ sys_write ↻ sys_write ↻ pw_crc_block pw_adler32 sys_close nx_media_convert_png sys_mmap ↻ ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ↻ nx_png_decode sys_mmap ↻ _png_check_signature _png_read_u32_be nx_crc32 nx_crc32_update nx_crc32_init nx_crc32_table_at _png_n_channels _png_bytes_per_pixel _png_n_channels ↻ _png_a7_expected _png_a7_col0 _png_a7_coli _png_a7_row0 _png_a7_rowi nx_zlib_inflate sys_mmap ↻

structs

none

consts

none

functions

21func nx_media_convert_png(in_path: *u8, model: i64, dw: i64, dh: i64, out_path: *u8) -> i64
36func nx_img_to_rgb(src: *u8, w: i64, h: i64, nc: i64, dst: *u8) -> i64
59func _mc_finish(rgb: *u8, w: i64, h: i64, model: i64, dw: i64, dh: i64, out_path: *u8) -> i64
66func nx_media_convert_jpeg(in_path: *u8, model: i64, dw: i64, dh: i64, out_path: *u8) -> i64
80func nx_media_convert_file(in_path: *u8, model: i64, dw: i64, dh: i64, out_path: *u8) -> i64
110func main() -> i64