code wiki / (root) / nx_img_bytes_to_rgb.nx

nx_img_bytes_to_rgb.nx

buildroot/runtime/nx_img_bytes_to_rgb.nx

9633 B226 linesdepth 9pulls 44 transitivereach 36 importersview sourcekind librarytopic img
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_png_decoder.nx nx_jpeg_ascii.nx nx_gif_decode.nx nx_webp.nx nx_bmp_decode.nx nx_tiff_decode.nx nx_tga_decode.nx nx_pcx_decode.nx nx_ico_decode.nx nx_img_bytes_to_rgb.nx nishi_gui.nx nx_bmp_tiff_gate.nx nx_boxtex_gate.nx nx_curve_smoothness_census.nx nx_font_baseline_census.nx nx_gif_color_gate.nx nx_image_gray.nx nx_img_to_rgb.nx nx_imgdecode_test.nx nx_legacy_codec_gate.nx

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

25func ib_fourcc(b: *u8, off: i64, a: i64, c: i64, d: i64, e: i64) -> i64
called by 1: nx_img_bytes_to_rgb
33func nx_img_bytes_to_rgb(raw: *u8, rawlen: i64, out_wh: *i64) -> *u8