code wiki / img

topic: img

28 modules sharing the img name family (derived from the tree's prefix discipline).

The 'img' topic family in the Nishi sovereign ecosystem handles image processing and conversion across multiple stages, from raw byte decoding to final RGB output. Modules like nx_img_core establish the foundational decoding of image headers into pixel data, while nx_img_bytes_to_rgb transforms encoded buffers into interleaved RGB formats. nx_img_convert orchestrates the end-to-end conversion process, including resizing and encoding, ensuring seamless integration within the sovereign system's architecture.

auto-narrated by the local model from this topic's module headers; links verified against the wiki index.

narrated overview -- maintained by the narration lane, module links verified against this wiki.

moduledescriptionlinesfuncs
nx_img_adapt_gate.nxunit-tests channel adaptation (nx_img_to_rgb) for711
nx_img_bytes_to_rgb.nxdecode an IN-MEMORY encoded image buffer -> interleaved 8-bit RGB (w*h*3,2262
nx_img_convert.nxsovereign image CONVERT (resize -> encode), end-to-end.482
nx_img_convert_loop_gate.nxfull sovereign convert loop, gated.791
nx_img_core.nxR1 of the SOVEREIGN scanning stack (hardware rung up): raw bytes -> pixels. A sovereign image1119
nx_img_core_gate.nxproves R1 (bytes -> pixels): decode a P2 (ASCII) PGM and a P5 (binary) PGM into the pixel662
nx_img_decode_gate.nxreferee for JPEG wired into the shared decode path (nx_img_to_gray /19610
nx_img_dims.nxread an image's pixel WIDTH/HEIGHT straight from its header bytes (no decode). Powers the857
nx_img_dims_gate.nxKAT for the header dimension reader against hand-built PNG/GIF/JPEG headers with KNOWN666
nx_img_extract_demo.nxshow the parser finding media (image URLs) in HTML.304
nx_img_harvest.nxS-CLASS-EXCEED image-URL harvester (operator 2026-07-03: "no we want to get s class1959
nx_img_harvest_gate.nx975
nx_img_place.nxplace a decoded image onto a grayscale print page: luminance conversion + aspect-fit763
nx_img_place_test.nxgate for image luminance + aspect-fit + scale-blit (no PNG dependency; uses a612
nx_img_print.nxPRINT A DOCUMENT WITH AN IMAGE, end to end sovereign: generate/Decode a PNG ->1664
nx_img_resample.nxselectable-model image resampler (the "easily1234
nx_img_resample_gate.nxKAT gate for the selectable-model resampler.691
nx_img_sbs.nxsovereign SIDE-BY-SIDE evidence compositor: oracle screenshot | Nishi screenshot into625
nx_img_scale.nxsovereign image resampler, hardware-rung-up.913
nx_img_scale_diff.nxmeasured-exceed harness, step 3 (diff).481
nx_img_scale_emit.nxmeasured-exceed harness, step 1 (emit).361
nx_img_scale_gate.nxKAT gate for the sovereign bilinear resampler.801
nx_img_segment.nxR3 of the sovereign scanning stack: binary image -> connected components (glyph boxes).747
nx_img_segment_gate.nxproves R3 (connected-component segmentation) on a 5x5 binary image with TWO separate592
nx_img_threshold.nxR2 of the sovereign scanning stack: grayscale -> binary (ink/paper). Otsu's method finds523
nx_img_threshold_gate.nxproves R2 (Otsu threshold + binarize) on hand-computed images:463
nx_img_to_rgb.nxdecode an encoded image FILE -> interleaved 8-bit RGB (w*h*3, row-major). Thin PATH131
nx_img_to_rgb_gate.nxreferee for the RGB decode path (nx_img_to_rgb) AND the color descriptors1729