NVGIF Format Specification

← Back to Specifications

NVGIF (Not Very Good Image Format) is a lightweight, modular image format designed for efficiency, transparency, and compression. Each version builds upon the last, introducing new features while maintaining simplicity and compatibility.


NVGIFv1 — The Core

Header Structure (8 bytes)

Offset (bytes) Size (bytes) Description
0 3 Magic Bytes (NVG)
3 1 Version (1)
4 2 Width (big-endian)
6 2 Height (big-endian)

Features

Pixel Data


NVGIFv2 — Compression Introduced

Header Structure (9 bytes)

Offset (bytes) Size (bytes) Description
0 3 Magic Bytes (NVG)
3 1 Version (2)
4 1 Compression Type (0 = None, 1 = RLE)
5 2 Width (big-endian)
7 2 Height (big-endian)

Features

Pixel Data


NVGIFv3 — Alpha Support & Full Compression

Header Structure (10 bytes)

Offset (bytes) Size (bytes) Description
0 3 Magic Bytes (NVG)
3 1 Version (3)
4 1 Compression Type (0 = None, 1 = RLE)
5 1 Alpha Flag (0 = Off, 1 = On)
6 2 Width (big-endian)
8 2 Height (big-endian)

Features

Pixel Data


Version Comparison

Feature NVGIFv1 NVGIFv2 NVGIFv3
Magic Bytes NVG NVG NVG
Version Byte ✅ (1) ✅ (2) ✅ (3)
Compression ❌ None ✅ RLE (optional) ✅ RLE (optional)
Alpha Support ❌ None ❌ None ✅ RGBA support
Row Structure Raw RGB Raw or RLE Raw or RLE + Alpha