code wiki / _hdl_build / nx_ppm_to_png.nx

nx_ppm_to_png.nx

buildroot/runtime/_hdl_build/nx_ppm_to_png.nx

2874 B64 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic ppm
docsdependenciesstructsconstsfunctions

about

nx_ppm_to_png.nx -- sovereign P6 PPM -> PNG converter (viewing/interop tool for framebuffer dumps that Nishi Windows surfaces write via win_writefile). Parses the P6 header (magic, w, h, maxval) then encodes RGB via nx_png_write. usage: nx_ppm_to_png <in.ppm> <out.png>. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_png_write.nx nx_ppm_to_png.nx

imports: nx_syscalls.nxnx_png_write.nx

imported by: nobody (leaf or entry point)

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

main hw sys_write sys_exit sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close rdint skipws sys_write ↻ 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 ↻

structs

none

consts

none

functions

7func hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
9func skipws(buf: *u8, n: i64, p: i64) -> i64
called by 1: rdint
24func rdint(buf: *u8, n: i64, p: *i64) -> i64
called by 1: main calls 1: skipws
39func main(argc: i64, argv: *i64) -> i64