nx_imgfacts.nx
buildroot/runtime/nx_imgfacts.nx
about
nx_imgfacts.nx -- per-asset DIMENSIONS + bytes for a gathered corpus, and a real GALLERY page.
The operator's question is a product question, not a plumbing one: "are we getting too small of images?"
A contact sheet cannot answer it -- every tile is normalised to the same box, so a 120px thumbnail and a
3000px original look identical. This decodes each asset for its TRUE pixel size, reports the distribution,
and emits a gallery that shows every image at its own scale with its dimensions stated.
usage: nx_imgfacts <dir> <out.html> <url-prefix> [title]
dependencies 4 imports · 0 importers
imports: nx_str.nxnx_syscalls.nxnx_dir.nxnx_img_to_rgb.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 14 | const IF_MAGIC_1024: i64 = 1024 |
| 16 | const IF_MAXROWS: i64 = 4096 |
| 17 | const IF_ARENA: i64 = 1048576 |
| 18 | const IF_PATH: i64 = 4096 |
| 19 | const IF_HTML: i64 = 4194304 |
functions
| 21 | func if_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 } |
| 23 | func if_num(v: i64, o: *u8) -> i64 |
| 36 | func if_pi(v: i64) -> i64 { let o: *u8 = sys_mmap(32); let n: i64 = if_num(v, o); sys_write(1, o, n); return 0 } |
| 38 | func if_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i } called by 1: main |
| 39 | func if_catb(dst: *u8, off: i64, s: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { dst[off+i] = s[i]; i = i + 1 } return off + n } |
| 40 | func if_catn(dst: *u8, off: i64, v: i64) -> i64 { let o: *u8 = sys_mmap(32); let n: i64 = if_num(v, o); return if_catb(dst, off, o, n) } |
| 42 | func if_fsize(path: *u8) -> i64 |
| 49 | func main(argc: i64, argv: *i64) -> i64 |