Skip to content

.ntft image format

james edited this page Apr 25, 2017 · 3 revisions

Overview

The .ntft format is used for most images in the web client.

Like the other image formats used by the app, it does not contain any dimension information, however .ntfts embedded as icons in .ugo files are expected to be 32 x 32 pixels.

Format documentation

First, it's important to note that the width of the image is rounded up to the nearest power of 2. For example, an image that is 50 px wide will be padded to 64 px wide when encoded into a .ntft. When you include the image in a page using with an <img> tag, just use the original width for the width attribute (in this case, width="50") and the image will be clipped correctly.

[todo - graphic explaining this]

Each pixel of the image is represented by a two-bytes of data that represents the color of that pixel. There is no header or palette data. Colors are stored in a rgba5551 format.

Images are read using a scanline method. The data starts with the pixel at the top-left, then progresses linearly left-to-right, top-to-bottom until the pixel in the bottom-right corner.

Notes

  • Image size can't seem to exceed 128px x 128px ?
  • These can be used in both HTML pages and ugomenus, as well as background images