code wiki / (root) / nx_skinsample.nx

nx_skinsample.nx

buildroot/runtime/nx_skinsample.nx

4141 B76 linesdepth 10pulls 32 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_skinsample.nx -- CLI over nx_skinsample_lib (aesthetictwin AT23, 2026-09-16): skin colour measured from a mirrored photograph and written onto a twin card as MEASURED rows. nx_skinsample measure <jpeg> -> decode, mask, print L a b (x1e3), ITA (deg10), mask count and coverage nx_skinsample card <slug> <refkey> <jpeg> <when> -> measure, then append skin_L skin_a skin_b ita rows to knowledge/twincard/<slug>.card (refused when any of those rows already exists: retire the observed row first) exit: 0 ok | 2 usage | 3 unreadable | 4 decode failed (not a baseline or progressive JPEG the estate decodes) | 5 UNMEASURED (no pixel passed the skin mask) | 6 rows exist license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_skinsample_lib.nx nx_skinsample.nx

imports: nx_syscalls.nxnx_skinsample_lib.nx

imported by: nobody (leaf or entry point)

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

main skc_usage sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sks_measure_file sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close nx_jpeg_decode_rgb sys_mmap ↻ nx_jpeg_dec_ctx_init sys_mmap ↻ nx_jpeg_ctx_tables_reset nx_jpeg_ctx_htable_at nx_jpeg_ctx_htable_bind nx_jpeg_ctx_htable_at ↻ nx_jpeg_ctx_qtable_at _jpeg_ascii_probe_sof sys_mmap ↻ nx_jpeg_seg_init nx_jpeg_seg_next nx_jpeg_classify_marker

structs

none

consts

12const SKC_EXIT_USAGE: i64 = 2
13const SKC_EXIT_READ: i64 = 3
14const SKC_EXIT_DECODE: i64 = 4
15const SKC_EXIT_UNMEASURED: i64 = 5
16const SKC_EXIT_EXISTS: i64 = 6
17const SKC_ARGC_MEASURE: i64 = 3
18const SKC_ARGC_CARD: i64 = 6
19const SKC_PERMIL: i64 = 1000

functions

21func skc_usage() -> i64
called by 1: main
25func skc_report(path: *u8, res: *i64) -> i64
called by 1: main
39func skc_rc(rc: i64) -> i64
called by 1: main
46func main(argc: i64, argv: *i64) -> i64