nx_img_bytes_to_rgb.nx
buildroot/runtime/nx_img_bytes_to_rgb.nx
about
nx_img_bytes_to_rgb.nx -- decode an IN-MEMORY encoded image buffer -> interleaved 8-bit RGB (w*h*3,
row-major). THE single decode chokepoint: the bytes-in core shared by nx_img_to_rgb (path variant),
the Windows GUI (read_local + this), the reader/tiler, and -- via the nx_image_gray projection --
the whole reverse-image search plane. FORMAT ROSTER (2026-08-05, each gate-proven): JPEG (baseline +
progressive + DRI/RST restart markers) · GIF87a/89a (palette colour, de-interlaced, first frame) ·
WebP VP8L lossless (lossy VP8 refuses -- C3 pending) · BMP (BI_RGB 1/4/8/24/32 + RLE8, both row
orders) · TIFF (baseline strips, none+PackBits, gray/RGB/palette, LE+BE) · PNG (all colour types
incl palette, sub-byte depths, Adam7 interlace; 16-bit high byte) . TGA (types 1/2/3 + RLE 9/10/11,
origin bit honoured) . PCX (8-bit palette, 24-bit planar, 1-bit) . ICO/CUR (largest frame; DIB or
PNG body) . PNM P1-P6. Returns the rgb buffer + sets
out_wh[0]=w, out_wh[1]=h; returns 0 on failure/unsupported -- NEVER a wrong image. license_tier: ORIGINAL
dependencies 11 imports · 19 importers
diagram shows first 10 each side; +1 more imports, +9 more importers in the complete lists below.
imports: nx_syscalls.nxnx_png_decoder.nxnx_jpeg_ascii.nxnx_gif_decode.nxnx_webp.nxnx_bmp_decode.nxnx_tiff_decode.nxnx_tga_decode.nxnx_pcx_decode.nxnx_ico_decode.nxnx_pnm_decode.nx
imported by: nishi_gui.nxnx_bmp_tiff_gate.nxnx_boxtex_gate.nxnx_curve_smoothness_census.nxnx_font_baseline_census.nxnx_gif_color_gate.nxnx_image_gray.nxnx_img_to_rgb.nxnx_imgdecode_test.nxnx_legacy_codec_gate.nxnx_png_adam7_gate.nxnx_polish_census.nxnx_reader_panels.nxnx_reader_tile.nxnx_reader_tile_gate.nxnx_render_judge_gate.nxnx_silhouette.nxnx_typequality_census.nxnx_vp8_kf_gate.nx
structs
| none |
consts
| none |
functions
| 25 | func ib_fourcc(b: *u8, off: i64, a: i64, c: i64, d: i64, e: i64) -> i64 called by 1: nx_img_bytes_to_rgb |
| 33 | func nx_img_bytes_to_rgb(raw: *u8, rawlen: i64, out_wh: *i64) -> *u8 called by 19: load_imagesmainmaincs_loadfb_loadmain+13 calls 12: sys_mmapnx_jpeg_decode_rgbgif_decode_rgbib_fourccwebp_decodebmp_decode_rgb+6 |