NTFT is a direct-colour online image format. The published description gives it no file header, palette or internal dimensions: each pixel is a 16-bit RGBA5551 value. The caller must know the intended width and height. UGO icons using NTFT are expected to be 32 × 32 pixels. [1]
Row stride
Like NPF, NTFT may pad the encoded width to the next power of two. The visible width used by the page is a clip rectangle, not necessarily the stored row stride. Read rows left to right, top to bottom, using the padded width for byte offsets. [1]
Transparency and validation
The alpha bit is part of each pixel word, unlike NPF's transparent palette index. Before decoding, check that the supplied bytes cover the padded width × height × two bytes. A wrong width can still produce a plausible first row, so compare a known two-row fixture. [1]
Client context
NTFT can appear in HTML, UGO menus and backgrounds. Its presentation limit depends on how the client allocates image resources. The wiki's rough 128 × 128 observation is not a proven universal file-size limit, and the original-ROM guide does not claim full image-cache behaviour is reconstructed. [1][2]
Image dimensions and storage
A 32 × 32 UGO icon needs 2,048 bytes, with one RGBA5551 halfword per pixel. The page supplies other display dimensions, and stored rows may be padded to a power-of-two width. The wiki reports an approximate 128 × 128 ceiling, but does not establish a limit that applies to every parser call. [3]
Calculate NTFT rows without a file header
NTFT supplies most of the images in the documented web client. Its dimensions come from the surrounding page or menu rather than the image bytes. [1]
A display width of fifty pixels is represented using a sixty-four-pixel stored row. With two bytes per pixel, the stored stride is 128 bytes. For visible coordinate (x, y) within that image, the pixel word starts at byte 2 × (64 × y + x). An HTML width="50" requests the original visible width; it does not change the stored stride. [1]
There is no palette or header to skip before the first pixel. The format is described as RGBA5551, and scanlines run from the upper-left corner across each row, then down. The cited page does not give the channel bit positions. Check the packing against a known decoder before implementing it; the format name alone is ambiguous. UGO icons have an explicit 32 × 32 context and therefore occupy 2,048 bytes each. [1]
The format appears in both HTML and UGO content, including background imagery. The wiki suggests a 128 × 128 image limit, but leaves it as an open question. Larger images have not been shown to be invalid. [1]
Example: visible width and padding
The colours in this diagram mark the visible pixels and padding. The padding pixels can have other colours in the file. Only one row is shown.
A 50-pixel-wide NTFT uses a stored stride of 64 pixels in this example. With two bytes per pixel, each stored row occupies 128 bytes even though the first 100 bytes describe the 50 visible pixels. The image element uses width="50" to crop the padded columns. Neither the visible width nor the stored width appears in a file header. [1]
